Page 2 of 2

Re: Usage of CCM RAM in 3.0.0

Posted: Thu Apr 02, 2015 11:20 am
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?

Re: Usage of CCM RAM in 3.0.0

Posted: Thu Apr 02, 2015 11:26 am
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