Open driftregion opened 2 years ago
I'm now able to build a .FLM that passes flash_algo.py
. https://github.com/driftregion/FlashAlgo/commit/c685f32928f080c977b1badc97f1f9f0efb3157e
Now flash erase fails with the following error:
pyocd.core.exceptions.FlashEraseFailure: flash erase sector failure (address 0x0000f000; result code 0x1)
Background
I have a Keil pack that is missing a flash memory region which I'd like to manipulate via pyocd.
Pack
https://developer.arm.com/embedded/cmsis/cmsis-packs/devices/NXP/S32K142UAxxxLLx Keil.S32_SDK_DFP.1.5.0.pack Keil.S32_SDK_DFP.pdsc
Memory regions
0x00000000-0x00040000
"Program / code flash" (pack contains .FLM, usable with pyocd)0x10000000-0x1000FFFF
"FlexNVM / code flash" (no .FLM)relevant section of .pdsc:
Problem encountered
I've found and read the CMSIS-Pack-Spec Flash Algorithm documentation: https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/flashAlgorithm.html
I've started by reproducing the existing .FLM for memory region
0x0000000-0x00040000
. A patch is here: https://github.com/driftregion/FlashAlgo/commit/c6463340f6a7b6ac6807efc8c93610f1f253068eUsing this patch to
pyocd flash ...
, I find the following error:This looks linker-related, but I'm not sure where to start.
I've attached the original .FLM (S32K142_P256_2KB_SEC.FLM.bak) and the .FLM produced by my patch (S32K142_P256_2KB_SEC.FLM) as a zip file:
S32K142_P256_2KB_SEC.zip
FlashAlgo:project_generator question
projects.yaml
to output multiple .elf/.FLM files? This target device has two non-contiguous flash regions. If I understand correctly, each region needs its own .FLMUpstreaming question
Related: https://github.com/pyocd/cmsis-pack-manager/issues/122#issuecomment-538858623