Andras Lipoth

Bug report: flash configuration issue on twrk60f120 in MQX 3.8.1

Discussion created by Andras Lipoth on Nov 26, 2012
Latest reply on Nov 27, 2012 by Martin Bielik

In MQX 3.8.1 the file mqx/source/bsp/twrk60f120m/cw/intflash.lcf incorrectly places the flash configuration data at 0x410 instead of 0x400. The actual configuration field ends up being filled with zeros, which results in a secured CPU (debug is disabled). CodeWarrior's flash programmer hides the issue by making sure the flash configuration is valid. Using other firmware loader tools or methods (e.g. over-the-air programming), which program the image verbatim, will be affected by the bug and may end up with undesirable security settings.


The fix is trivial, see the diff output below:


--- MQX-3.8.1-original/mqx/source/bsp/twrk60f120m/cw/intflash.lcf

+++ MQX-3.8.1-fixed/mqx/source/bsp/twrk60f120m/cw/intflash.lcf

@@ -1,7 +1,7 @@



-   vectorrom   (RX): ORIGIN = 0x00000000, LENGTH = 0x00000410

-   cfmprotrom  (RX): ORIGIN = 0x00000410, LENGTH = 0x00000010

+   vectorrom   (RX): ORIGIN = 0x00000000, LENGTH = 0x00000400

+   cfmprotrom  (R):  ORIGIN = 0x00000400, LENGTH = 0x00000020

    rom         (RX): ORIGIN = 0x00000420, LENGTH = 0x0007FBE0  # Code + Const data  

    ram         (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x00020000  # SRAM - RW data