[stm32] fix targets in experimental
The upstream pw_boot refactoring broke these downstream targets.
Change-Id: I96e7ecb4ae82d3520e7dc5998c6f18df458943f2
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/experimental/+/56830
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Ali Zhang <alizhang@google.com>
Pigweed-Auto-Submit: Ali Zhang <alizhang@google.com>
diff --git a/targets/stm32f207zg-nucleo/target_toolchains.gni b/targets/stm32f207zg-nucleo/target_toolchains.gni
index 66317fb..5f57d74 100644
--- a/targets/stm32f207zg-nucleo/target_toolchains.gni
+++ b/targets/stm32f207zg-nucleo/target_toolchains.gni
@@ -30,7 +30,7 @@
get_path_info("stm32f207zg_executable.gni", "abspath")
# Path to the bloaty config file for the output binaries.
- # pw_bloat_BLOATY_CONFIG = "$dir_pw_boot_armv7m/bloaty_config.bloaty"
+ # pw_bloat_BLOATY_CONFIG = "$dir_pw_boot_cortex_m/bloaty_config.bloaty"
#TODO: Fix test server: likely have to fork stm32cube-disc1 implementation
# if (pw_use_test_server) {
@@ -42,7 +42,7 @@
# Facade backends
pw_assert_BACKEND = dir_pw_assert_basic
- # pw_boot_BACKEND = dir_pw_boot_armv7m
+ # pw_boot_BACKEND = "$dir_pw_boot_cortex_m:armv7m"
pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
diff --git a/targets/stm32f429i_disc1_stm32cube/BUILD.gn b/targets/stm32f429i_disc1_stm32cube/BUILD.gn
index 275b274..2e3c575 100644
--- a/targets/stm32f429i_disc1_stm32cube/BUILD.gn
+++ b/targets/stm32f429i_disc1_stm32cube/BUILD.gn
@@ -34,7 +34,8 @@
pw_source_set("pre_init") {
configs = [ ":pw_malloc_active" ]
public_deps = [
- "$dir_pw_boot_armv7m",
+ "$dir_pw_boot",
+ "$dir_pw_boot_cortex_m:armv7m",
"$dir_pw_sys_io_stm32cube",
]
deps = [
diff --git a/targets/stm32f429i_disc1_stm32cube/boot.cc b/targets/stm32f429i_disc1_stm32cube/boot.cc
index dfbb25e..819e9ea 100644
--- a/targets/stm32f429i_disc1_stm32cube/boot.cc
+++ b/targets/stm32f429i_disc1_stm32cube/boot.cc
@@ -12,8 +12,9 @@
// License for the specific language governing permissions and limitations under
// the License.
-#include "pw_boot_armv7m/boot.h"
+#include "pw_boot/boot.h"
+#include "pw_boot_cortex_m/boot.h"
#include "pw_malloc/malloc.h"
#include "pw_preprocessor/compiler.h"
#include "pw_sys_io_stm32cube/init.h"
@@ -23,7 +24,7 @@
void pw_boot_PreStaticConstructorInit() {
#if PW_MALLOC_ACTIVE
- pw_MallocInit();
+ pw_MallocInit(&pw_boot_heap_low_addr, &pw_boot_heap_high_addr);
#endif // PW_MALLOC_ACTIVE
}
diff --git a/targets/stm32f429i_disc1_stm32cube/target_toolchains.gni b/targets/stm32f429i_disc1_stm32cube/target_toolchains.gni
index cad879a..85ac957 100644
--- a/targets/stm32f429i_disc1_stm32cube/target_toolchains.gni
+++ b/targets/stm32f429i_disc1_stm32cube/target_toolchains.gni
@@ -30,7 +30,7 @@
get_path_info("stm32f429i_executable.gni", "abspath")
# Path to the bloaty config file for the output binaries.
- pw_bloat_BLOATY_CONFIG = "$dir_pw_boot_armv7m/bloaty_config.bloaty"
+ pw_bloat_BLOATY_CONFIG = "$dir_pw_boot_cortex_m/bloaty_config.bloaty"
#TODO: Fix test server: likely have to fork stm32f429i-disc1 implementation
# if (pw_use_test_server) {
@@ -41,7 +41,7 @@
# Facade backends
pw_assert_BACKEND = dir_pw_assert_basic
- pw_boot_BACKEND = dir_pw_boot_armv7m
+ pw_boot_BACKEND = "$dir_pw_boot_cortex_m:armv7m"
### pw_cpu_exception not yet used
# pw_cpu_exception_ENTRY_BACKEND =
@@ -63,7 +63,7 @@
"$dir_pigweed/targets/stm32f429i_disc1:system_rpc_server"
pw_malloc_BACKEND = dir_pw_malloc_freelist
- pw_boot_armv7m_LINK_CONFIG_DEFINES = [
+ pw_boot_cortex_m_LINK_CONFIG_DEFINES = [
"PW_BOOT_FLASH_BEGIN=0x08000200",
"PW_BOOT_FLASH_SIZE=2048K",
diff --git a/targets/stm32f429i_disc1_stm32cube/vector_table.c b/targets/stm32f429i_disc1_stm32cube/vector_table.c
index fd7691e..ad2ea7d 100644
--- a/targets/stm32f429i_disc1_stm32cube/vector_table.c
+++ b/targets/stm32f429i_disc1_stm32cube/vector_table.c
@@ -14,7 +14,8 @@
#include <stdbool.h>
-#include "pw_boot_armv7m/boot.h"
+#include "pw_boot/boot.h"
+#include "pw_boot_cortex_m/boot.h"
#include "stm32f4xx.h"
// Default handler to insert into the ARMv7-M vector table (below).
diff --git a/targets/stm32f439zi_nucleo/target_toolchains.gni b/targets/stm32f439zi_nucleo/target_toolchains.gni
index b3e4c55..b584c24 100644
--- a/targets/stm32f439zi_nucleo/target_toolchains.gni
+++ b/targets/stm32f439zi_nucleo/target_toolchains.gni
@@ -30,7 +30,7 @@
get_path_info("stm32f439zi_executable.gni", "abspath")
# Path to the bloaty config file for the output binaries.
- pw_bloat_BLOATY_CONFIG = "$dir_pw_boot_armv7m/bloaty_config.bloaty"
+ pw_bloat_BLOATY_CONFIG = "$dir_pw_boot_cortex_m/bloaty_config.bloaty"
#TODO: Fix test server: likely have to fork stm32f429i-disc1 implementation
# if (pw_use_test_server) {
@@ -41,7 +41,7 @@
# Facade backends
pw_assert_BACKEND = dir_pw_assert_basic
- pw_boot_BACKEND = dir_pw_boot_armv7m
+ pw_boot_BACKEND = "$dir_pw_boot_cortex_m:armv7m"
pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
diff --git a/targets/stm32f439zi_nucleo/vector_table.c b/targets/stm32f439zi_nucleo/vector_table.c
index 6a87da3..cd06916 100644
--- a/targets/stm32f439zi_nucleo/vector_table.c
+++ b/targets/stm32f439zi_nucleo/vector_table.c
@@ -14,7 +14,7 @@
#include <stdbool.h>
-#include "pw_boot_armv7m/boot.h"
+#include "pw_boot_cortex_m/boot.h"
#include "stm32f4xx.h"
// Default handler to insert into the ARMv7-M vector table (below).
diff --git a/targets/stm32h753zi-nucleo/target_toolchains.gni b/targets/stm32h753zi-nucleo/target_toolchains.gni
index b36a766..f142cfa 100644
--- a/targets/stm32h753zi-nucleo/target_toolchains.gni
+++ b/targets/stm32h753zi-nucleo/target_toolchains.gni
@@ -30,7 +30,7 @@
get_path_info("stm32h753zi_executable.gni", "abspath")
# Path to the bloaty config file for the output binaries.
- # pw_bloat_BLOATY_CONFIG = "$dir_pw_boot_armv7m/bloaty_config.bloaty"
+ # pw_bloat_BLOATY_CONFIG = "$dir_pw_boot_cortex_m/bloaty_config.bloaty"
#TODO: Fix test server: likely have to fork stm32cube-disc1 implementation
# if (pw_use_test_server) {
@@ -42,7 +42,7 @@
# Facade backends
pw_assert_BACKEND = dir_pw_assert_basic
- # pw_boot_BACKEND = dir_pw_boot_armv7m
+ # pw_boot_BACKEND = "$dir_pw_boot_cortex_m:armv7m"
pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
diff --git a/targets/stm32l552ze-nucleo/target_toolchains.gni b/targets/stm32l552ze-nucleo/target_toolchains.gni
index 1ce7e8a..ce84684 100644
--- a/targets/stm32l552ze-nucleo/target_toolchains.gni
+++ b/targets/stm32l552ze-nucleo/target_toolchains.gni
@@ -30,7 +30,7 @@
get_path_info("stm32l552ze_executable.gni", "abspath")
# Path to the bloaty config file for the output binaries.
- # pw_bloat_BLOATY_CONFIG = "$dir_pw_boot_armv7m/bloaty_config.bloaty"
+ # pw_bloat_BLOATY_CONFIG = "$dir_pw_boot_cortex_m/bloaty_config.bloaty"
#TODO: Fix test server: likely have to fork stm32cube-disc1 implementation
# if (pw_use_test_server) {
@@ -42,7 +42,7 @@
# Facade backends
pw_assert_BACKEND = dir_pw_assert_basic
- # pw_boot_BACKEND = dir_pw_boot_armv7m
+ # pw_boot_BACKEND = "$dir_pw_boot_cortex_m:armv7m"
pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",