2024-12-19 07:26 AM - last edited on 2024-12-19 07:33 AM by Andrew Neil
I made a project on keil with generate flm file to download to external flash with my board. My board has a stm32h7b0zbt6 chip with ospi interface with a spi nor flash W25Q128. the interface releate is:
PF6 ------> OCTOSPIM_P1_IO3
PF7 ------> OCTOSPIM_P1_IO2
PF9 ------> OCTOSPIM_P1_IO1
PB2 ------> OCTOSPIM_P1_CLK
PD11 ------> OCTOSPIM_P1_IO0
PC11 ------> OCTOSPIM_P1_NCS
and I append the project , is there anyone can help me to check the project ?
When I try to use this flm file to download code on keil, I get errors like below:
Solved! Go to Solution.
2024-12-19 08:30 PM
https://github.com/cturvey/stm32extldr/blob/main/h7_w25q128/README.md#support
https://github.com/cturvey/stm32extldr/blob/main/h7_w25q128/W25Q128_STM32H7AX-CUSTOM30.FLM
2024-12-19 08:30 PM
https://github.com/cturvey/stm32extldr/blob/main/h7_w25q128/README.md#support
https://github.com/cturvey/stm32extldr/blob/main/h7_w25q128/W25Q128_STM32H7AX-CUSTOM30.FLM
2024-12-20 04:41 AM
thanks for your help , after I check this flm file, I found all data get 0XAA , I do not know why cause this ?
2024-12-20 05:06 AM
After I enable flash map , then I check the external flash data is right ,very thanks for your help .
2024-12-20 07:54 AM
Yes, as a general rule I don't use Memory Mapping in the loaders, and either have a .INI for the debugger, or bring up external memory in SystemInit() so run-to-main has it visible prior to hitting the break-point in main()
2024-12-21 03:04 AM
I modified the .sct file, made some code to ext flash like:
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x08000000 0x00020000 { ; load region size_region
ER_IROM1 0x08000000 0x00020000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00020000 {
.ANY (+RW +ZI)
}
RW_IRAM2 0x24000000 0x00100000 {
.ANY (+RW +ZI)
}
;RW_EXRAM2 0xC0000000 0x2000000 {
; .ANY (+RW +ZI)
;}
}
LR_ROM1 0x90000000 0x00100000 {
ER_ROM1 0x90000000 0x00100000 { ; load address = execution address
uicode.o (+RO)
* (.init_array)
}
}
And then I made some code change, modified ext flash in function SystemInit. I can lanuch the whole project run with Jlink in swd mode.
But If I repowered the board, I found the code do not run.
And if I just scan the chip in keil Debug->settings, the the app will run. Besides I use pemicro multilink to download code previous, but the multilink is hard to download to external flash in keil ,so I changed Jlink.