Trap: Accessing unwritten flash memory

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi,

I am working on a TC234.
My software, which is based on Autosar is doing some checks in ROM at startup.
The address range X which is checked is not written during flashing my software.
That means, that I have reserved this address range X in my linker script.

The software expects that this address range X in ROM is already filled with correct data.
This means before flashing my software, another HEX file is flashed, which fills this address range X.

Best case:
1)The address range X is written.
2lAfter that my software is flashed.
3)My software runs and accesses this memory.
4) everything is fine

Worst case:
1) The address range X is unwritten (by a mistake)
2) my software is flashed
3) my software runs and accesses this memory
4) A trap occurs while accessing unwritten memory

How do I check safely if the address range X is unwritten?
0 Likes
1 Reply
User11926
Level 1
Level 1
Dear Mr. Ferhat,

I am also having problem with the ROM check.

During ROM check i am getting trap while accessing the uninitialized data.

If you know how to initialize the ROM during flashing please tell me ,it would be helpful to me.

Thank you

Regards,

Venkat
0 Likes