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

STM32F3 common startup #3240

Merged
merged 6 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/test_build_bootloader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ EXIT_CODE=0
BSPS=$(ls repos/apache-mynewt-core/hw/bsp)
IGNORED_BSPS="ci40 dialog_cmac embarc_emsk hifive1 native native-armv7\
native-mips nucleo-f030r8 nucleo-f072rb\
nucleo-f303k8\
olimex-p103 olimex-pic32-emz64 olimex-pic32-hmz144\
pic32mx470_6lp_clicker pic32mz2048_wi-fire usbmkw41z\
weact_g431cb"
Expand Down
7 changes: 1 addition & 6 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,6 @@ ppic32mx.h
stm32f7xx_hal_conf.h
startup_stm32f746xx.s

# STM32F3 Discovery BSP - BSD License
startup_stm32f303xc.s

# STM32L152C BSP - BSD License
stm32l1xx_hal_conf.h
startup_stm32l152xc.s
Expand Down Expand Up @@ -334,9 +331,7 @@ system_apollo3.h
clock_stm32f3xx.c
system_stm32f3xx.c

# Nucleo-F303K8, Nucleo-F303RE - BSD License.
startup_stm32f303x8.s
startup_stm32f303xe.s
# Nucleo-F303K8, Nucleo-F303RE, STM32F3 Discovery - BSD License.
stm32f3xx_hal_conf.h

# Ignore documentation folder
Expand Down
1 change: 1 addition & 0 deletions .style_ignored_dirs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ hw/bsp/stm32f7discovery/include/bsp/stm32f7xx_hal_conf.h
hw/bsp/stm32l152discovery/include/bsp/stm32l1xx_hal_conf.h
hw/bsp/nucleo-u575zi-q/include/bsp/stm32u5xx_hal_conf.h
hw/bsp/weact_g431cb/include/bsp/stm32g4xx_hal_conf.h
hw/mcu/stm/stm32f3xx/src/system_stm32f3xx.c
hw/mcu/stm/stm32g0xx/src/system_stm32g0xx.c
hw/mcu/stm/stm32g4xx/src/system_stm32g4xx.c
hw/mcu/stm/stm32u5xx/src/system_stm32u5xx.c
Expand Down
3 changes: 0 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,8 @@ This product bundles parts of STM32CubeF3, which is available under the
* hw/mcu/stm/stm32f3xx/src/clock_stm32f3xx.c
* hw/mcu/stm/stm32f3xx/src/system_stm32f3xx.c
* hw/bsp/stm32f3discovery/include/bsp/stm32f3xx_hal_conf.h
* hw/bsp/stm32f3discovery/src/arch/cortex_m4/startup_stm32f303xc.s
* hw/bsp/nucleo-f303k8/include/bsp/stm32f3xx_hal_conf.h
* hw/bsp/nucleo-f303k8/src/arch/cortex_m4/startup_stm32f303x8.s
* hw/bsp/nucleo-f303re/include/bsp/stm32f3xx_hal_conf.h
* hw/bsp/nucleo-f303re/src/arch/cortex_m4/startup_stm32f303xe.s

This product bundles parts of STM32CubeH7, which is available under the
"3-clause BSD" license. Bundled files are:
Expand Down
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 = 0x08008000, LENGTH = 192K
CCRAM (rw): ORIGIN = 0x10000000, LENGTH = 16K
SRAM (rw): ORIGIN = 0x20000000, LENGTH = 64K
}
/*
* 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
Loading