Hi.
TESTNAME=bootloader test sequence is in BP210 CM3 test sequence,
In especially, we could find the below code,
then we got the below error message when we ran the simulation.
23490 ns UART: CMSDK Boot Loader 27270 ns UART: - load flash 45710 ns UART: 50750 ns UART: CMSDK Boot Loader 54530 ns UART: - load flash 63750 ns UART: - Error: REMAP is already clear 64130 ns UART: Test Ended
Does it have any correct test sequence for resolving that error?
Why Remap is already cleared? what am I supposed to do to resolve this problem?
Hi there,
The bootloader code is expected to be used only when the bootloader ROM is present in the system (See cmsdk_mcu_defs.v, when ARM_CMSDK_BOOT_MEM_TYPE is not set to AHB_ROM_NONE). When bootloader is present, the bootloader compiled image is loaded into the bootloader ROM in startup (note: not the normal ROM).
And the code will clear the REMAP control register (reg_remap) in cmsdk_mcu_sysctrl.v
You might get the above error message if
- you tried to load the boot loader ROM in the normal ROM memory. Because the bootloader is already executed once, the register value is 0
- the example system RTL has been modified that the REMAP control register cannot be read.
regards,
Joseph
Thank you so much let me know that.
I think there are 3 boot type 1.boot loader, 2.ROM memory boot, 3.RAM memory boot.
and this time I will trying to use boot loader boot.
As your instruction sir, I've set the memory type as the below,
and also boot loader.c
But here I'v got some question,
1. How can I enable the boot loader with other memories?
I mean If I want to run the boot loader simulation, I should have to set as the below memory type.
`define ARM_CMSDK_BOOT_MEM_TYPE `AHB_ROM_BEH_MODEL`define ARM_CMSDK_ROM_MEM_TYPE `AHB_ROM_NONE`define ARM_CMSDK_RAM_MEM_TYPE `AHB_RAM_NONE
as your instruction, just only AHB_ROM_BEH_MODEL is defined. others NONE.
If after finish the boot loader booting, How do I use ROM and RAM with above setting?
I found the below sentence "If you enable the boot loader". Is there any option for this in design kit? Can you guide me?
2. When I ran the simulation with below setting,
there is no error message but
27270 ns UART: - load flash 31090 ns UART: - DSB 34630 ns UART: - ISB 41550 ns UART: - FlashLoader_ASM
There is no any action after FlashLoader_ASM.
Do I need something else?
3. In flashLoader function, we can see the CMSDK_SYSCON->REMAP = 0. and I've checked REMAP went to 0 from 1 in simulation.
But I'm confused that Why do we need "CMSDK_SYSCON->REMAP = 0"?
As we can see the below, If we set the remap '0', it means 'without remap'.
In the CMSDK example system, we only have two boot types:- No boot loader, start application in application ROM- Boot up from boot loader, then switch over to the application in application ROM.In both cases, we expect the "application" code is running from application ROM>`define ARM_CMSDK_ROM_MEM_TYPE `AHB_ROM_NONEBy setting this to None, it means application ROM is not available and hence the system crashed. That's why you don't see anything afterwards.In Cortex-M0, M0+, M3 and M4 processors, the boot sequence always take the initial MSP and reset vector from address 0x00000000 and 0x00000004. As a result, to enable the use of a boot loader, the boot loader need to be in address 0x00000000.When REMAP is 1 (at starting), it maps the first 64KB of the memory into boot ROM for starting the boot loader. But normally (when running the application) you want the application ROM to be there. Therefore we need to switch off remap inside the boot loader (by that time it will be running the boot loader code from boot loader memory in 0x01000000). After that the first 64KB is then mapped to the application ROM and the default vector table in application ROM (at 0x00000000) would be in use.