> Debug any one demo which is from the SDK library to recover.
I tried both the hello_world example and the iled_blinky, they did not help. Still no SWD device is found. My other development boards work (KL25Z, K28F...), but not this one.
When I plug it into the USB port, a bright red LED flashes twice, then the board looks OK. However, trying to debug any program makes the red LED to light up, and to stay on.
To recap, what I did, breaking the EVK:
The modified beginning of the main function looks:
#define IOMUX16 (*(uint32_t*)0x400AC040)
#define IOMUX17 (*(uint32_t*)0x400AC044)
...
// Remap SRAM: DTCM: 96k. ITCM: 0. OCRAM: 32k
IOMUX16 &= ~7UL; IOMUX16 |= 6;
IOMUX17 &= ~0xffUL; IOMUX17 |= 0x6a;
// Initialize board hardware
BOARD_ConfigMPU();
...
Since the C-linker does not know about these changes, it still allocates small stack, so we have to make changes to the project properties.
Project Properties -> C/C++ Build -> Settings -> MCU settings
SRAM_DTC size = 0x18000
SRAM_OC size = 0x8000
Project Properties -> C/C++ Build -> Settings -> MCU Linker -> Managed Linker Scripts
Stack size = 0x17000
However, all these seem to interfere with the function “BOARD_ConfigMPU()” in the system startup C file “board.c”. There the original, default region sizes are used (with setting the attributes shareable, cacheable, etc.), unaffected by the changes we just made in the project settings.
It is unclear if we have to edit the file “board.c”, too, and what else? - These were my original questions...
Editing the MCU settings under project properties caused the board to stop functioning.