Usage of CCM RAM in 3.0.0

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

Moderator: RoccoMarco

User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Been thanked: 7 times

Re: Usage of CCM RAM in 3.0.0

Post by barthess »

Hi people.
I am totally unhappy with NOLOAD because I waste a day trying to find
why my software crashes in unhandled exception with IBUSERR flag in SCB_CFSR register.
The reason is in the following code

Code: Select all

__attribute__((section(".ram4"))) static tlm_registry_t Registry[] = {
    {11, NULL, send_attitude},
    {12, NULL, send_debug},
    {13, NULL, send_debug_vect},
    {14, NULL, send_global_pos},
    {15, NULL, send_gps_raw_int},
    {16, NULL, send_highres_imu},
    {17, NULL, send_nav_output},
    {18, NULL, send_position_ned},
    {19, NULL, send_raw_imu},
    {20, NULL, send_raw_press},
    {21, NULL, send_rc},
    {22, NULL, send_rc_scaled},
    {23, NULL, send_scal_press},
    {24, NULL, send_sys_status},
    {25, NULL, send_vfr_hud},
};

I assumed that structure initializes correctly but it is not.
It fills with garbage and now need to be reinitialized from within some user's function.

I know about large *.bin file but why not use *.hex or *.srec files. Or *.elf file
loading it with gdb?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Usage of CCM RAM in 3.0.0

Post by Giovanni »

The problem is not the file format but the startup file, currently only "data" is supported for data initialization.

You would have to have an array of sections to be initialized (source, destination, length), not impossible but hard enough.

Giovanni
Post Reply