Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kl27z_hic: Update GCC flash & ROM bootloader config and tweak non-microbit value #959

Merged
merged 3 commits into from
May 18, 2022

Conversation

microbit-carlos
Copy link
Contributor

@microbit-carlos microbit-carlos commented May 4, 2022

  • Sets the ROM bootloader settings in the GCC builds to mirror armcc
  • For both GCC and armcc it changes the default (non-microbit) flash config for FOPT from 0x39 to 0x3B
    • The main difference is that BOOTPIN_OPT is set to 1, so it doesn't trigger the ROM bootloader if the BOOTCFG0 pin is grounded (which in micro:bit is connected to TP1, to trigger the ROM bootloader)
    • The original GCC code had set this value to 0x3F which wasn't quite right either
  • It also updates the GCC and armcc DAPLink Interface builds to not include the flash config data, which right now is being unnecessarily added to flash at address 0x8400
    • The flash config goes into address 0x400, so it only needs to be set in the DAPLink bootloader builds

This porst into th GCC asm file the flash config data from the
armcc file for the micro:bit board.

The default kl27z configuration (non-micro:bit) has been updated in
both GCC and armcc to have the FOPT config disable NMI interrupts
and ensure the BOOTCFG0 pin doesn't force the ROM bootloader to
run on startup.
This config data goes to addres 0x400 in flash, which corresponds
to the bootloader area.
Currently the Interface builds included the same data at
address 0x8400, which is unneccesary.
As done with the armcc builds, this only enables USB in the ROM
bootloader, so that any random traffic in the I2C/SPI/UART pins
doesn't accidentally trigger the bootloader.
@mbrossard mbrossard merged commit 29ce012 into ARMmbed:main May 18, 2022
@microbit-carlos microbit-carlos deleted the kl27z-gcc-flashconfig branch May 18, 2022 16:28
@mbrossard mbrossard added this to the v0258 milestone Jan 28, 2023
mbrossard added a commit to mbrossard/DAPLink that referenced this pull request Mar 27, 2023
Changes in ARMmbed#959 created an issue for GCC builds of k26f_bl, kl26z_bl, and k20dx_bl
in the generation of .bin file:

```
../../../tools/post_build_script_gcc.py
build/k26f_bl_crc
Error - only 1 region allowed in hex file 2 found.
Regions:
 0: 0x00000000 - 0x000003bf
 1: 0x00000400 - 0x0000ffff
```
mathias-arm pushed a commit that referenced this pull request Apr 18, 2023
Changes in #959 created an issue for GCC builds of k26f_bl, kl26z_bl, and k20dx_bl
in the generation of .bin file:

```
../../../tools/post_build_script_gcc.py
build/k26f_bl_crc
Error - only 1 region allowed in hex file 2 found.
Regions:
 0: 0x00000000 - 0x000003bf
 1: 0x00000400 - 0x0000ffff
```
mathias-arm pushed a commit that referenced this pull request May 10, 2023
Changes in #959 created an issue for GCC builds of k26f_bl, kl26z_bl, and k20dx_bl
in the generation of .bin file:

```
../../../tools/post_build_script_gcc.py
build/k26f_bl_crc
Error - only 1 region allowed in hex file 2 found.
Regions:
 0: 0x00000000 - 0x000003bf
 1: 0x00000400 - 0x0000ffff
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants