strlen builtin

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
Hildy
Posts: 8
Joined: Wed May 01, 2013 12:55 pm

strlen builtin

Post by Hildy »

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.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: strlen builtin

Post by Giovanni »

Hi,

Could this be a toolchain/libraries problem? which compiler are you using?

Giovanni
Hildy
Posts: 8
Joined: Wed May 01, 2013 12:55 pm

Re: strlen builtin

Post by Hildy »

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.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: strlen builtin

Post by Giovanni »

Could you try a different toolchain? for example this one: https://launchpad.net/gcc-arm-embedded

Giovanni
Post Reply