s32k310 C40_Ip Erasing/Programming and RTDs 5.0.0.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s32k310 C40_Ip Erasing/Programming and RTDs 5.0.0.

Jump to solution
358 Views
FabioG
Contributor III

Hi There.

I need to split the only Block0 (512kB) present in s32k310 in two parts: bootloader and application part.

Running bootloader, I need to erase/program application sectors and I need to load Erase and program functions to ".ramcode " (then .itcm later because SRAM is so small... ) because of a unique block0  available.

I have a lot of problem by placing RTDs functions in "ramcode, " 

Using an" attibute_section"  near each function is ok but it  makes the code unmaintainable when newer RTDs are available.

A much affordable approach is to replace MEM_43_INFLS_START_SEC_CODE/MEM_43_INFLS_END_SEC_CODE with  MEM_43_INFLS_START_SEC_RAMCODE/MEM_43_INFLS_END_SEC_RAMCODE in C40_ip.c

and   

RTE_START_SEC_CODE/  RTE_STOP_SEC_CODE      with   RTE_START_SEC_RAMCODE/  RTE_STOP_SEC_RAMCODE in  SchM_Mem_43_INFLS.c (called by C40_Ip) 

but, tacking a look to map file, not all the funcions  included (in those sections SRART/STOP) are placed  in ".ramcode"  section. and are still placed in .mcal_text.

In particular no one of the the functions I need is placed in ramcode.

 

Is it  available a method useful to place s32k310 RTDs  in ram ? Maybe I miss something.... Otherwise it is not possible to erase sectors of the same block in s32l310 (a bus fault hard exception always occours ) in an mantainable manner.

Best regards 

 

Fabio

0 Kudos
Reply
1 Solution
296 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @FabioG,

Yes, unfortunately this fix is needed for each RTD release as the default location is flash, but if you are not in need of the minor updates, you can keep working with the full RTM release of the RTD (5.0.0, for example) and keep the changes you've made.

Best regards,
Julián

View solution in original post

0 Kudos
Reply
3 Replies
339 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @FabioG,

The methods you mentioned are the recommended ways to place functions in ram, please see these two community posts:

Could you please follow the steps in those community posts and confirm again if the functions are correctly displayed in the map file?

Best regards,
Julián

0 Kudos
Reply
331 Views
FabioG
Contributor III
Hi Julian. I missed to place *_START_SEC_CODE/*_START_SEC_CODE in .h files too,
and all is ok now.
The only problem is that I need to remember to replace theese defines when I will change RTDs with newer ones otherwise a bus fault occours of course.
I also need to check C40_Ip PROGRAM\ERASE functions of newer RTDs for possibly new RTD callls code calls (placed by default in mcal_text)...
Best Regards
Fabio
0 Kudos
Reply
297 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @FabioG,

Yes, unfortunately this fix is needed for each RTD release as the default location is flash, but if you are not in need of the minor updates, you can keep working with the full RTM release of the RTD (5.0.0, for example) and keep the changes you've made.

Best regards,
Julián

0 Kudos
Reply