Hi,
I recently post a question because I had a rare RAM problem. Finally I realized that the reason of the problem came from the need to align the CAN0_RAM_BASE_ADDRESS to 0x10000.
The CAN0_RAM_BASE_ADDRESS is linked into the .bss section. By default in the linker_file.ld automate generated by the MCUxpresso, the .bss output section comes after the .data output section, and both are linked into the RAM_0_1_2 (0x20000000). This RAM has a lenght of 0x10000.
So, if .data is not empty, CAN0_RAM_BASE_ADDRESS can not be linked into the address 0x20000000 because it is already use by .data vars, and the following address aligned to 0x10000, is 0x20010000, and unfortunetly is out of range of the RAM_0_1_2.
This restricion make quiet unuseful the CAN module using CAN_MSG_RAM_BASE, because any static var initialization will cause a compilation error due to RAM out of range fail.
I found a workaround, using a manual .ld file and puting the .data after the .bss, but I don't like pretty much.
In my opinion this CAN module has a very big restriction with the alignment and the range memory of this microcontroler, and is something that should be take in consideration in following developments.
This post is just to help someone that have had the same problem, and to open a discousion about it findig a better solution.