From e173d7d2dbeb38a61993f31094be0f87851dd914 Mon Sep 17 00:00:00 2001 From: ckormanyos Date: Tue, 10 Sep 2024 20:46:00 +0200 Subject: [PATCH] Builds chalandi rp2350 but not yet run --- ref_app/ref_app.sln | 4 + .../src/mcal/rpi_pico2_rp2350/Mcal/Cpu/Cpu.c | 4 +- ref_app/target.vcxproj | 77 +++++-- ref_app/target.vcxproj.filters | 12 + .../micros/rpi_pico2_rp2350/Appli/main.c | 182 +++++++++++++++ .../rpi_pico2_rp2350/Std/Platform_Types.h | 42 ++++ .../rpi_pico2_rp2350/make/rpi_pico2_rp2350.ld | 212 +++++++++--------- .../make/rpi_pico2_rp2350_files.gmk | 18 +- .../make/rpi_pico2_rp2350_flags.gmk | 21 +- 9 files changed, 426 insertions(+), 146 deletions(-) create mode 100644 ref_app/target/micros/rpi_pico2_rp2350/Appli/main.c create mode 100644 ref_app/target/micros/rpi_pico2_rp2350/Std/Platform_Types.h diff --git a/ref_app/ref_app.sln b/ref_app/ref_app.sln index ff2143804..8d31cfca6 100644 --- a/ref_app/ref_app.sln +++ b/ref_app/ref_app.sln @@ -56,6 +56,7 @@ Global target riscvfe310|x64 = target riscvfe310|x64 target rl78|x64 = target rl78|x64 target rpi_pico_rp2040|x64 = target rpi_pico_rp2040|x64 + target rpi_pico2_rp2350|x64 = target rpi_pico2_rp2350|x64 target rx63n|x64 = target rx63n|x64 target stm32f100|x64 = target stm32f100|x64 target stm32f407|x64 = target stm32f407|x64 @@ -86,6 +87,7 @@ Global {C8B59726-9319-45C3-8F11-F9F388FB6A2C}.target riscvfe310|x64.ActiveCfg = Release|x64 {C8B59726-9319-45C3-8F11-F9F388FB6A2C}.target rl78|x64.ActiveCfg = Release|x64 {C8B59726-9319-45C3-8F11-F9F388FB6A2C}.target rpi_pico_rp2040|x64.ActiveCfg = Release|x64 + {C8B59726-9319-45C3-8F11-F9F388FB6A2C}.target rpi_pico2_rp2350|x64.ActiveCfg = Release|x64 {C8B59726-9319-45C3-8F11-F9F388FB6A2C}.target rx63n|x64.ActiveCfg = Release|x64 {C8B59726-9319-45C3-8F11-F9F388FB6A2C}.target stm32f100|x64.ActiveCfg = Release|x64 {C8B59726-9319-45C3-8F11-F9F388FB6A2C}.target stm32f407|x64.ActiveCfg = Release|x64 @@ -122,6 +124,8 @@ Global {30CE370B-40F3-4BCD-8986-64AAFF8971BD}.target rl78|x64.Build.0 = target rl78|x64 {30CE370B-40F3-4BCD-8986-64AAFF8971BD}.target rpi_pico_rp2040|x64.ActiveCfg = target rpi_pico_rp2040|x64 {30CE370B-40F3-4BCD-8986-64AAFF8971BD}.target rpi_pico_rp2040|x64.Build.0 = target rpi_pico_rp2040|x64 + {30CE370B-40F3-4BCD-8986-64AAFF8971BD}.target rpi_pico2_rp2350|x64.ActiveCfg = target rpi_pico2_rp2350|x64 + {30CE370B-40F3-4BCD-8986-64AAFF8971BD}.target rpi_pico2_rp2350|x64.Build.0 = target rpi_pico2_rp2350|x64 {30CE370B-40F3-4BCD-8986-64AAFF8971BD}.target rx63n|x64.ActiveCfg = target rx63n|x64 {30CE370B-40F3-4BCD-8986-64AAFF8971BD}.target rx63n|x64.Build.0 = target rx63n|x64 {30CE370B-40F3-4BCD-8986-64AAFF8971BD}.target stm32f100|x64.ActiveCfg = target stm32f100|x64 diff --git a/ref_app/src/mcal/rpi_pico2_rp2350/Mcal/Cpu/Cpu.c b/ref_app/src/mcal/rpi_pico2_rp2350/Mcal/Cpu/Cpu.c index 9f6d3d785..4b1c0eef7 100644 --- a/ref_app/src/mcal/rpi_pico2_rp2350/Mcal/Cpu/Cpu.c +++ b/ref_app/src/mcal/rpi_pico2_rp2350/Mcal/Cpu/Cpu.c @@ -18,8 +18,8 @@ //============================================================================= // Includes //============================================================================= -#include "Cpu.h" -#include "core_arch.h" +#include +#include //============================================================================= // Globals diff --git a/ref_app/target.vcxproj b/ref_app/target.vcxproj index c8dca8b6d..96ebf2c5d 100644 --- a/ref_app/target.vcxproj +++ b/ref_app/target.vcxproj @@ -1,6 +1,10 @@  + + target rpi_pico2_rp2350 + x64 + target stm32l432 x64 @@ -140,109 +144,115 @@ Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 Makefile Unicode true - v142 + v143 + + + Makefile + Unicode + true + v143 Makefile @@ -254,27 +264,27 @@ Makefile - v142 + v143 Makefile - v142 + v143 Makefile - v142 + v143 Makefile - v142 + v143 Makefile - v142 + v143 Makefile - v142 + v143 Makefile @@ -359,6 +369,9 @@ + + + <_ProjectFileVersion>10.0.30319.1 @@ -386,6 +399,7 @@ target\build\build.bat am335x target\build\build.bat bcm2835_raspi_b target\build\build.bat rpi_pico_rp2040 + target\build\build.bat rpi_pico2_rp2350 Build\Build.bat AVR rebuild Build\Build.bat AVR rebuild Build\Build.bat AVR rebuild @@ -411,6 +425,7 @@ target\build\build.bat am335x rebuild target\build\build.bat bcm2835_raspi_b rebuild target\build\build.bat rpi_pico_rp2040 rebuild + target\build\build.bat rpi_pico2_rp2350 rebuild Target\Build\Build.bat avr clean_all Target\Build\Build.bat atmega4809 clean_all Target\Build\Build.bat atmega2560 clean_all @@ -436,6 +451,7 @@ target\build\build.bat am335x clean_all target\build\build.bat bcm2835_raspi_b clean_all target\build\build.bat rpi_pico_rp2040 clean_all + target\build\build.bat rpi_pico2_rp2350 clean_all $(SolutionDir)bin\ref_app.hex $(SolutionDir)bin\ref_app.hex $(SolutionDir)bin\ref_app.hex @@ -460,6 +476,7 @@ $(SolutionDir)bin\ref_app.hex $(SolutionDir)bin\ref_app.hex $(SolutionDir)bin\ref_app.hex + $(SolutionDir)bin\ref_app.hex $(NMakePreprocessorDefinitions) $(NMakePreprocessorDefinitions) $(NMakePreprocessorDefinitions) @@ -484,6 +501,7 @@ + $(ProjectDir)/Cpp; $(ProjectDir)/Cpp/Hal/AVR;$(NMakeIncludeSearchPath) $(ProjectDir)/Cpp; $(ProjectDir)/Cpp/Hal/AVR;$(NMakeIncludeSearchPath) $(ProjectDir)/Cpp; $(ProjectDir)/Cpp/Hal/AVR;$(NMakeIncludeSearchPath) @@ -508,6 +526,7 @@ $(SolutionDir)/src;$(SolutionDir)/src/mcal/am335x $(SolutionDir)/src;$(SolutionDir)/src/mcal/bcm2835_raspi_b $(SolutionDir)/src;$(SolutionDir)/src/mcal/rpi_pico_rp2040;$(IncludePath) + $(SolutionDir)/src;$(SolutionDir)/src/mcal/rpi_pico_rp2040;$(IncludePath) $(NMakeForcedIncludes) $(NMakeForcedIncludes) $(NMakeForcedIncludes) @@ -532,6 +551,7 @@ + $(NMakeAssemblySearchPath) $(NMakeAssemblySearchPath) $(NMakeAssemblySearchPath) @@ -556,6 +576,7 @@ + $(NMakeForcedUsingAssemblies) $(NMakeForcedUsingAssemblies) $(NMakeForcedUsingAssemblies) @@ -580,6 +601,7 @@ + Build\Build.bat R8C Build\Build.bat R8C Build\Build.bat R8C rebuild @@ -821,6 +843,11 @@ $(SolutionDir)tmp\log\ref_app.log + + + $(SolutionDir)tmp\log\ref_app.log + + $(SolutionDir)..\Bin\App.log @@ -984,6 +1011,7 @@ + @@ -1049,6 +1077,7 @@ + diff --git a/ref_app/target.vcxproj.filters b/ref_app/target.vcxproj.filters index 12aa11b39..3e60a3b3f 100644 --- a/ref_app/target.vcxproj.filters +++ b/ref_app/target.vcxproj.filters @@ -271,6 +271,12 @@ {451ca947-56ce-46cf-a4e8-036c75f8b86a} + + {8f7c20e8-9cec-4cf8-b3b5-48ce200d6733} + + + {6be8f2e8-8491-442a-9308-13667c843931} + @@ -902,6 +908,9 @@ micros\rpi_pico2_rp2350\Startup\Core\ARM + + micros\rpi_pico2_rp2350\Appli + @@ -912,5 +921,8 @@ micros\rpi_pico2_rp2350\Startup\Core\ARM + + micros\rpi_pico2_rp2350\Std + \ No newline at end of file diff --git a/ref_app/target/micros/rpi_pico2_rp2350/Appli/main.c b/ref_app/target/micros/rpi_pico2_rp2350/Appli/main.c new file mode 100644 index 000000000..709832d3b --- /dev/null +++ b/ref_app/target/micros/rpi_pico2_rp2350/Appli/main.c @@ -0,0 +1,182 @@ +/****************************************************************************************** + Filename : main.c + + Core : ARM Cortex-M33 / RISC-V Hazard3 + + MCU : RP2350 + + Author : Chalandi Amine + + Owner : Chalandi Amine + + Date : 04.09.2024 + + Description : Application main function + +******************************************************************************************/ + +//============================================================================= +// Includes +//============================================================================= +#include "Platform_Types.h" +#include "Cpu.h" +#include "Gpio.h" +#include "SysTickTimer.h" + +//============================================================================= +// Macros +//============================================================================= + +//============================================================================= +// Prototypes +//============================================================================= +void main_Core0(void); +void main_Core1(void); +void BlockingDelay(uint32 delay); + +//============================================================================= +// Globals +//============================================================================= +#ifdef DEBUG + volatile boolean boHaltCore0 = TRUE; + volatile boolean boHaltCore1 = TRUE; +#endif + +//----------------------------------------------------------------------------------------- +/// \brief main function +/// +/// \param void +/// +/// \return void +//----------------------------------------------------------------------------------------- +int main(void) +{ + /* Run the main function of the core 0, it will start the core 1 */ + main_Core0(); + + /* Synchronize with core 1 */ + RP2350_MulticoreSync((uint32_t)HW_PER_SIO->CPUID.reg); + + /* endless loop on the core 0 */ + for(;;); + + /* never reached */ + return(0); +} + +//----------------------------------------------------------------------------------------- +/// \brief main_Core0 function +/// +/// \param void +/// +/// \return void +//----------------------------------------------------------------------------------------- +void main_Core0(void) +{ +#ifdef DEBUG + while(boHaltCore0); +#endif + +#ifdef CORE_FAMILY_ARM + /* Disable interrupts on core 0 */ + __asm volatile("CPSID i"); +#endif + + /* Output disable on pin 25 */ + LED_GREEN_CFG(); + + + /* Start the Core 1 and turn on the led to be sure that we passed successfully the core 1 initiaization */ + if(TRUE == RP2350_StartCore1()) + { + LED_GREEN_ON(); + } + else + { + /* Loop forever in case of error */ + while(1) + { + __asm volatile("NOP"); + } + } + +} + +//----------------------------------------------------------------------------------------- +/// \brief main_Core1 function +/// +/// \param void +/// +/// \return void +//----------------------------------------------------------------------------------------- + volatile uint64_t* pMTIMECMP = (volatile uint64_t*)&(HW_PER_SIO->MTIMECMP.reg); + volatile uint64_t* pMTIME = (volatile uint64_t*)&(HW_PER_SIO->MTIME.reg); + +void main_Core1(void) +{ +#ifdef DEBUG + while(boHaltCore1); +#endif + + /* Note: Core 1 is started with interrupt enabled by the BootRom */ + + /* Clear the stiky bits of the FIFO_ST on core 1 */ + HW_PER_SIO->FIFO_ST.reg = 0xFFu; + +#ifdef CORE_FAMILY_ARM + __asm volatile("DSB"); + + /* Clear all pending interrupts on core 1 */ + NVIC->ICPR[0] = (uint32)-1; + +#endif + + /* Synchronize with core 0 */ + RP2350_MulticoreSync((uint32_t)HW_PER_SIO->CPUID.reg); + + +#ifdef CORE_FAMILY_RISC_V + + /* configure the machine timer for 1Hz interrupt window */ + #include "riscv.h" + + /* enable machine timer interrupt */ + riscv_set_csr(RVCSR_MIE_OFFSET, 0x80ul); + + /* enable global interrupt */ + riscv_set_csr(RVCSR_MSTATUS_OFFSET, 0x08ul); + + /* configure machine timer to use 150 MHz */ + HW_PER_SIO->MTIME_CTRL.bit.FULLSPEED = 1; + + /* set next timeout (machine timer is enabled by default) */ + *pMTIMECMP = *pMTIME + 150000000ul; //1s + +#endif + + while(1) + { +#ifdef CORE_FAMILY_ARM + #define DELAY 15000000 + LED_GREEN_TOGGLE(); +#else + #define DELAY 10000000 +#endif + + BlockingDelay(DELAY); + } +} + + +#ifdef CORE_FAMILY_RISC_V +__attribute__((interrupt)) void Isr_MachineTimerInterrupt(void); + +void Isr_MachineTimerInterrupt(void) +{ + *pMTIMECMP = *pMTIME + 150000000ul; + + LED_GREEN_TOGGLE(); +} + +#endif + diff --git a/ref_app/target/micros/rpi_pico2_rp2350/Std/Platform_Types.h b/ref_app/target/micros/rpi_pico2_rp2350/Std/Platform_Types.h new file mode 100644 index 000000000..c5524b9cc --- /dev/null +++ b/ref_app/target/micros/rpi_pico2_rp2350/Std/Platform_Types.h @@ -0,0 +1,42 @@ +/****************************************************************************************** + Filename : Platform_Types.h + + Core : ARM Cortex-M33 / RISC-V Hazard3 + + MCU : RP2350 + + Author : Chalandi Amine + + Owner : Chalandi Amine + + Date : 04.09.2024 + + Description : Platform types header file + +******************************************************************************************/ + +#ifndef __PLATFORM_TYPES_H__ +#define __PLATFORM_TYPES_H__ + +typedef unsigned char uint8; +typedef signed char sint8; +typedef unsigned short uint16; +typedef signed short sint16; +typedef unsigned long uint32; +typedef signed long sint32; +typedef unsigned long long uint64; +typedef signed long long sint64; + +typedef void (*pFunc)(void); + +typedef enum +{ + FALSE = 0, + TRUE +}boolean; + +#define NULL (void*)0 + +#define NULL_PTR (void*)0 + +#endif diff --git a/ref_app/target/micros/rpi_pico2_rp2350/make/rpi_pico2_rp2350.ld b/ref_app/target/micros/rpi_pico2_rp2350/make/rpi_pico2_rp2350.ld index 7240ae485..fb346f89f 100644 --- a/ref_app/target/micros/rpi_pico2_rp2350/make/rpi_pico2_rp2350.ld +++ b/ref_app/target/micros/rpi_pico2_rp2350/make/rpi_pico2_rp2350.ld @@ -1,144 +1,140 @@ -/* - Copyright Christopher Kormanyos 2024. - Distributed under the Boost Software License, - Version 1.0. (See accompanying file LICENSE_1_0.txt - or copy at http://www.boost.org/LICENSE_1_0.txt) -*/ - -/* Linker script for STM32F1xx ARM(R) Cortex(TM)-M3 MCU */ - -INPUT(libc.a libm.a libgcc.a) - -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) +/****************************************************************************************** + Filename : Memory_Map.ld + + Core : ARM Cortex-M33 / RISC-V Hazard3 + + MCU : RP2350 + + Author : Chalandi Amine + + Owner : Chalandi Amine + + Date : 04.09.2024 + + Description : Linker description file for Raspberry Pi Pico 2 + +******************************************************************************************/ + +/****************************************************************************************** + ELF Entrypoint +******************************************************************************************/ +ENTRY(Startup_Init) + +/****************************************************************************************** + Globals +******************************************************************************************/ +__STACK_SIZE_CORE0 = 2K; +__STACK_SIZE_CORE1 = 2K; + +/****************************************************************************************** + Memory configuration +******************************************************************************************/ MEMORY { - SBL(rx) : ORIGIN = 0x10000000, LENGTH = 0x200 - VEC(rx) : ORIGIN = 0x10000200, LENGTH = 0x200 - ROM(rx) : ORIGIN = 0x10000400, LENGTH = 2M - 0x400 - RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 264K - 4K - 4K + FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 32M + RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 512K } +/****************************************************************************************** + Sections definition +******************************************************************************************/ SECTIONS { - /* Pico Secondary bootloader */ - .SBL : + /* Program code */ + .program : ALIGN(4) { - . = ALIGN(4); - PROVIDE(__SBL_BASE_ADDRESS = .); - *(.SBL) - KEEP(*(.SBL)) - } > SBL - - /* Interrupt vector table */ - .intvect : - { - . = ALIGN(4); + PROVIDE(__CODE_BASE_ADDRESS = .); PROVIDE(__INTVECT_BASE_ADDRESS = .); + *(.riscv_intvect) + KEEP(*(.riscv_intvect)) *(.intvect_c0) *(.intvect_c1) KEEP(*(.intvect_c0)) KEEP(*(.intvect_c1)) - } > VEC - - /* startup */ - .startup : - { - *(.startup) - . = ALIGN(0x10); - KEEP(*(.startup)) - } > ROM = 0x5555 + PROVIDE(__IMAGE_DEF_BLOCK_START_ADDRESS = .); + KEEP(*(.image_start_block)) + *(.text) + *(.text.*) + } > FLASH - /* Program code (text), read-only data and static ctors */ - .text : + /* Read-only data (.rodata) */ + .rodata : ALIGN(4) { - _ctors_begin = .; - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array*)) - _ctors_end = .; - *(.progmem*) - . = ALIGN(4); - *(.text) - . = ALIGN(4); - *(.text*) - . = ALIGN(4); + PROVIDE(__RODATA_BASE_ADDRESS = .); *(.rodata) - . = ALIGN(4); - *(.rodata*) - . = ALIGN(4); - *(.glue_7) - . = ALIGN(4); - *(.glue_7t) - . = ALIGN(4); - } > ROM + } > FLASH - .ARM.extab : + /* Section for constructors */ + .ctors : ALIGN(4) { + PROVIDE(__CPPCTOR_LIST__ = .); + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array)) + LONG(-1) ; + PROVIDE(__CPPCTOR_END__ = .); . = ALIGN(4); - *(.ARM.extab) - *(.ARM.extab*) - *(.gnu.linkonce.armextab.*) - . = ALIGN(4); - } > ROM + } > FLASH + - .exidx : + /* Section for destructors */ + .dtors : ALIGN(4) { + PROVIDE(__CPPDTOR_LIST__ = .); + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array)) + LONG(-1) ; + PROVIDE(__CPPDTOR_END__ = .); + . = ALIGN(4); + } > FLASH + + /* Runtime clear table */ + .clear_sec : ALIGN(4) + { + PROVIDE(__RUNTIME_CLEAR_TABLE = .) ; + LONG(0 + ADDR(.bss)); LONG(SIZEOF(.bss)); + LONG(-1); LONG(-1); . = ALIGN(4); - PROVIDE(__exidx_start = .); - *(.ARM.exidx*) - . = ALIGN(4); - PROVIDE(__exidx_end = .); - } > ROM + } > FLASH - .ARM.attributes : + /* Runtime copy table */ + .copy_sec : ALIGN(4) { - *(.ARM.attributes) - } > ROM - - . = 0x20000000; - . = ALIGN(4); + PROVIDE(__RUNTIME_COPY_TABLE = .) ; + LONG(LOADADDR(.data)); LONG(0 + ADDR(.data)); LONG(SIZEOF(.data)); + LONG(-1); LONG(-1); LONG(-1); + . = ALIGN(4); + } > FLASH /* The ROM-to-RAM initialized data section */ - .data : + .data : ALIGN(4) { - _data_begin = .; + PROVIDE(__DATA_BASE_ADDRESS = .); *(.data) - . = ALIGN(4); - KEEP (*(.data)) - *(.data*) - . = ALIGN(4); - KEEP (*(.data*)) - _data_end = .; - } > RAM AT > ROM + } > RAM AT>FLASH - /* The uninitialized (zero-cleared) data section */ - .bss : + /* The uninitialized (zero-cleared) bss section */ + .bss : ALIGN(4) { - _bss_begin = .; + PROVIDE(__BSS_BASE_ADDRESS = .); *(.bss) - . = ALIGN(4); - KEEP (*(.bss)) - *(.bss*) - . = ALIGN(4); - KEEP (*(.bss*)) - _bss_end = .; } > RAM - PROVIDE(end = .); - PROVIDE(_fini = .); - - _rom_data_begin = LOADADDR(.data); - - /* stack definitions */ - - . = 0x20041FF8; - . = ALIGN(8); - - PROVIDE(__CORE0_STACK_TOP = .) ; + /* stack definition */ + .stack_core0 : + { + . = ALIGN(MAX(__STACK_SIZE_CORE0 , .), 8); + PROVIDE(__CORE0_STACK_TOP = .) ; + } > RAM - . = 0x20040FF8; - . = ALIGN(8); + .stack_core1 : + { + . = ALIGN(MAX(__STACK_SIZE_CORE1 , .), 8); + PROVIDE(__CORE1_STACK_TOP = .) ; + } > RAM - PROVIDE(__CORE1_STACK_TOP = .) ; } diff --git a/ref_app/target/micros/rpi_pico2_rp2350/make/rpi_pico2_rp2350_files.gmk b/ref_app/target/micros/rpi_pico2_rp2350/make/rpi_pico2_rp2350_files.gmk index b7e6c25e5..fe8e06bf6 100644 --- a/ref_app/target/micros/rpi_pico2_rp2350/make/rpi_pico2_rp2350_files.gmk +++ b/ref_app/target/micros/rpi_pico2_rp2350/make/rpi_pico2_rp2350_files.gmk @@ -9,10 +9,14 @@ # File list of the stm32f1xx files in the project # ------------------------------------------------------------------------------ -FILES_TGT = $(PATH_APP)/mcal/$(TGT)/mcal_cpu_rp2040 \ - $(PATH_APP)/mcal/mcal_gcc_cxx_completion \ - $(PATH_TGT)/startup/crt0 \ - $(PATH_TGT)/startup/crt0_init_ram \ - $(PATH_TGT)/startup/crt1 \ - $(PATH_TGT)/startup/int_vect \ - $(PATH_TGT)/startup/secondary_boot +FILES_CPP := + +FILES_TGT = $(PATH_APP)/mcal/$(TGT)/Mcal/Clock/Clock \ + $(PATH_APP)/mcal/$(TGT)/Mcal/Cpu/Cpu \ + $(PATH_APP)/mcal/$(TGT)/Mcal/SysTickTimer/SysTickTimer \ + $(PATH_TGT)/Appli/main \ + $(PATH_TGT)/Startup/Core/ARM/boot \ + $(PATH_TGT)/Startup/Core/ARM/image_definition_block \ + $(PATH_TGT)/Startup/Core/ARM/IntVect \ + $(PATH_TGT)/Startup/Core/ARM/util \ + $(PATH_TGT)/Startup/Startup diff --git a/ref_app/target/micros/rpi_pico2_rp2350/make/rpi_pico2_rp2350_flags.gmk b/ref_app/target/micros/rpi_pico2_rp2350/make/rpi_pico2_rp2350_flags.gmk index 46b755fe2..814ecd01f 100644 --- a/ref_app/target/micros/rpi_pico2_rp2350/make/rpi_pico2_rp2350_flags.gmk +++ b/ref_app/target/micros/rpi_pico2_rp2350/make/rpi_pico2_rp2350_flags.gmk @@ -17,22 +17,33 @@ TGT_SUFFIX = elf TGT_ALLFLAGS = -O2 \ -mlittle-endian \ -mlong-calls \ - -mcpu=cortex-m0plus \ + -mcpu=cortex-m33 \ + -march=armv8-m.main+fp+dsp \ + -mfloat-abi=softfp \ -mthumb \ -mabi=aapcs \ -finline-functions \ - -finline-limit=64 \ - -ffast-math + -finline-limit=64 TGT_CFLAGS = -std=c11 \ -Wunsuffixed-float-constants \ - $(TGT_ALLFLAGS) + $(TGT_ALLFLAGS) \ + -DCORE_FAMILY_ARM TGT_CXXFLAGS = -std=c++14 \ -Wno-psabi \ $(TGT_ALLFLAGS) -TGT_INCLUDES = -isystem $(PATH_APP)/util/STL +TGT_INCLUDES = -I$(PATH_TGT)/Startup/Core/ARM \ + -I$(PATH_APP)/mcal/$(TGT)/Mcal/Clock \ + -I$(PATH_APP)/mcal/$(TGT)/Mcal/Cmsis \ + -I$(PATH_APP)/mcal/$(TGT)/Mcal/Cmsis/m-profile \ + -I$(PATH_APP)/mcal/$(TGT)/Mcal/Cpu \ + -I$(PATH_APP)/mcal/$(TGT)/Mcal/Gpio \ + -I$(PATH_APP)/mcal/$(TGT)/Mcal/SysTickTimer \ + -I$(PATH_APP)/mcal/$(TGT)/Mcal \ + -I$(PATH_TGT)/Std \ + -isystem $(PATH_APP)/util/STL TGT_AFLAGS =