If you have an issue to run MQX + FNET Bootloader on Lasco.
You should aply workaround to MQX code (otherwise it goes to infinite “while” )
/Special thanks to Amly/
bsp_init.c (for mcf51cn platform):
static void _mqx_clock_init_25MHz()
{
...............................................
#if 0
//b) Loop until OSCINIT (bit 1) in MCGSC is 1, indicating the crystal selected by the EREFS bit
//has been initialized.
while (!(reg_ptr->MCG.MCGSC & MCF51XX_MCGSC_OSCINIT_MASK))
;
#endif
...............................................
#if 0
// wait for Reference Status bit to update
while (!(reg_ptr->MCG.MCGSC & MCF51XX_MCGSC_IREFST_MASK))
;
#endif
...............................................
}
Hope it be fixed in the future version of MQX.
Also the standard modifications that are valid for all platforms:
1. user_config.h
#define MQX_ROM_VECTORS 0
2. intflash_FNET.lcf
MEMORY
{
fnet_bootloader (RX) : ORIGIN = 0x00000000, LENGTH = 0x0000B000 # 44KB reserved for FNET bootloader
# cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000020
vectorrom (RX) : ORIGIN = 0x0000B000, LENGTH = 0x00000400
# rom (RX) : ORIGIN = 0x00000420, LENGTH = 0x0001FBDF # Code + Const data
rom (RX) : ORIGIN = 0x0000B400, LENGTH = 0x00014800 # Code + Const data
fapp_paramsrom (RW) : ORIGIN = 0x0001FC00, LENGTH = 0x00000400 # 1KB = Last logical-block resevrd for params.
ram (RWX) : ORIGIN = 0x00800000, LENGTH = 0x00006000 # SRAM - RW data
# kernel space starts after RAM variables (Location of MQX Kernel data + MQX heap)
end_of_kd (RW): ORIGIN = 0x00805FF0, LENGTH = 0x00000000
# Boot stack reused by MQX Kernel data
bstack (RW): ORIGIN = 0x00805A00, LENGTH = 0x00000200 # Boot stack
end_bstack (RW): ORIGIN = 0x00805BFF, LENGTH = 0x00000000
}
SECTIONS
{
........................
#.cfmprotect :
#{
# *(.cfmconfig)
# . = ALIGN (0x4);
#} > cfmprotrom
.........................
}
Best regards,
Andrey Butok