Skip to content

Commit

Permalink
hw/bsp: Update all STMF3 BSPs to use common startup
Browse files Browse the repository at this point in the history
This removes local startup code and linker scripts

Signed-off-by: Jerzy Kasenberg <[email protected]>
  • Loading branch information
kasjer committed Jun 5, 2024
1 parent 6164bc4 commit 6d30d2c
Show file tree
Hide file tree
Showing 27 changed files with 141 additions and 1,772 deletions.
8 changes: 2 additions & 6 deletions hw/bsp/nucleo-f303k8/bsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ bsp.url: https://www.st.com/en/evaluation-tools/nucleo-f303k8.html
bsp.maker: "STMicroelectronics"
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
bsp.linkerscript:
- "hw/bsp/nucleo-f303k8/nucleo-f303k8.ld"
- "@apache-mynewt-core/hw/mcu/stm/stm32f3xx/stm32f303.ld"
bsp.downloadscript: "hw/bsp/nucleo-f303k8/nucleo-f303k8_download.sh"
bsp.linkerscript: autogenerated
bsp.downloadscript: "hw/scripts/download.sh"
bsp.debugscript: "hw/bsp/nucleo-f303k8/nucleo-f303k8_debug.sh"
bsp.downloadscript.WINDOWS.OVERWRITE: "hw/bsp/nucleo-f303k8/nucleo-f303k8_download.cmd"
bsp.debugscript.WINDOWS.OVERWRITE: "hw/bsp/nucleo-f303k8/nucleo-f303k8_debug.cmd"

bsp.flash_map:
areas:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
Expand All @@ -16,17 +16,18 @@
* specific language governing permissions and limitations
* under the License.
*/
ENTRY(Reset_Handler)

/*
* Memory map
* Memory regions placed in CCM
* If stack or core data or other section should be place in RAM
* <target_name>/link/include/target_config.ld.h should just do:
* #undef BSSNZ_RAM
* #undef COREBSS_RAM
* #undef COREDATA_RAM
* #undef STACK_REGION
*/
MEMORY {
FLASH (rx): ORIGIN = 0x08004000, LENGTH = 88K
CCRAM (rw): ORIGIN = 0x10000000, LENGTH = 8K
SRAM (rw): ORIGIN = 0x20000000, LENGTH = 40K
}
/*
* Image header size - no bootloader support, no header.
*/
_imghdr_size = 0x20;

#define BSSNZ_RAM CCM
#define COREBSS_RAM CCM
#define COREDATA_RAM CCM
#define STACK_REGION CCM
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
Expand All @@ -16,16 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
ENTRY(Reset_Handler)

/*
* Memory map
*/
MEMORY {
FLASH (rx): ORIGIN = 0x08000000, LENGTH = 16K
CCRAM (rw): ORIGIN = 0x10000000, LENGTH = 8K
SRAM (rw): ORIGIN = 0x20000000, LENGTH = 40K
}

/* The bootloader does not contain an image header */
_imghdr_size = 0x0;
#ifdef STACK_REGION
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = (4K - STACK_SIZE)
STACK_RAM (rw) : ORIGIN = 0x10001000 - STACK_SIZE, LENGTH = STACK_SIZE
#else
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 4K
#endif
22 changes: 0 additions & 22 deletions hw/bsp/nucleo-f303k8/nucleo-f303k8_debug.cmd

This file was deleted.

22 changes: 0 additions & 22 deletions hw/bsp/nucleo-f303k8/nucleo-f303k8_download.cmd

This file was deleted.

55 changes: 0 additions & 55 deletions hw/bsp/nucleo-f303k8/nucleo-f303k8_download.sh

This file was deleted.

2 changes: 2 additions & 0 deletions hw/bsp/nucleo-f303k8/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ pkg.cflags.HARDFLOAT:
pkg.deps:
- "@apache-mynewt-core/hw/mcu/stm/stm32f3xx"
- "@apache-mynewt-core/libc"
- "@apache-mynewt-core/hw/scripts"
- "@apache-mynewt-core/boot/startup"
Loading

0 comments on commit 6d30d2c

Please sign in to comment.