I'm having problems with strlen on an STM32F103; I had this working on LPC2148, but for some reason it crashes:
void
console_log (const char *c)
{
sdWrite (&SD1, (uint8_t *) c, strlen (c));
sdWrite (&SD1, (uint8_t *) "\n\r", 2);
}
on STM32, I had to write my own strlen; the builtin hangs hard.
strlen builtin
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: strlen builtin
Hi,
Could this be a toolchain/libraries problem? which compiler are you using?
Giovanni
Could this be a toolchain/libraries problem? which compiler are you using?
Giovanni
Re: strlen builtin
I'm using the paparazzi ppa gcc-4.6.2 from here:
http://paparazzi.enac.fr/wiki/Installation/Linux
they target stm32f1xx as their primary board.
this is the same compiler that I had working with lpc2148.
http://paparazzi.enac.fr/wiki/Installation/Linux
they target stm32f1xx as their primary board.
this is the same compiler that I had working with lpc2148.
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: strlen builtin
Could you try a different toolchain? for example this one: https://launchpad.net/gcc-arm-embedded
Giovanni
Giovanni