diff --git a/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/bsp.cpp b/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/bsp.cpp index 865416f5c2e36be04ccec016b6c6d841ad83d2b2..d978f972054b83697fb4f0148ba5119c6bbfa1cb 100644 --- a/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/bsp.cpp @@ -72,19 +72,22 @@ void IRQbspInit() uart1::tx::mode(Mode::OUTPUT); uart1::rx::mode(Mode::INPUT); - can::rx::mode(Mode::INPUT); - can::tx::mode(Mode::OUTPUT); - using namespace actuators; - abort1::mode(Mode::OUTPUT); - ignition1::mode(Mode::OUTPUT); - spare::mode(Mode::OUTPUT); //non sicuro se input o output + abortPin::mode(Mode::OUTPUT); + ignitionPin::mode(Mode::OUTPUT); + umbilicalPin::mode(Mode::OUTPUT); + + abortPin::high(); + umbilicalPin::high(); + ignitionPin::low(); -#warning RICORDARSI DI TOGLIERE IL LED IN BOOT!! - _led::mode(Mode::OUTPUT_2MHz); + #ifdef DEBUG + _led::mode(Mode::OUTPUT_2MHz); ledOn(); delayMs(100); ledOff(); + #endif + DefaultConsole::instance().IRQset(intrusive_ref_ptr<Device>( #ifndef STDOUT_REDIRECTED_TO_DCC new STM32Serial(defaultSerial,defaultSerialSpeed, diff --git a/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/hwmapping.h b/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/hwmapping.h index 00ae4a06d6ed0a9a19b0279fba7c409e7c5afc6f..a0729674a96fef93312d49b42db57ea15240ce2f 100644 --- a/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/hwmapping.h +++ b/miosix/arch/cortexM3_stm32/stm32f103c8_skyward_alderaan/interfaces-impl/hwmapping.h @@ -26,7 +26,7 @@ ***************************************************************************/ #ifndef HWMAPPING_H -#define HWMAPPING_H +#define HWMAPPING_H #include "interfaces/gpio.h" @@ -35,41 +35,26 @@ namespace miosix { namespace interfaces { - namespace spi1 { - using sck = Gpio<GPIOA_BASE, 5>; - using miso = Gpio<GPIOA_BASE, 6>; - using mosi = Gpio<GPIOA_BASE, 7>; - } //namespace spi1 + namespace spi1 { + using sck = Gpio<GPIOA_BASE, 5>; + using miso = Gpio<GPIOA_BASE, 6>; + using mosi = Gpio<GPIOA_BASE, 7>; + } //namespace spi1 - namespace spi2 { - using sck = Gpio<GPIOB_BASE, 13>; - using miso = Gpio<GPIOB_BASE, 14>; - using mosi = Gpio<GPIOB_BASE, 15>; - } //namespace spi2 [non usato] + namespace uart1 { + using tx = Gpio<GPIOA_BASE, 9>; + using rx = Gpio<GPIOA_BASE, 10>; + } //namespace uart1 - namespace i2c { - using scl = Gpio<GPIOB_BASE, 8>; - using sda = Gpio<GPIOB_BASE, 9>; - } //namespace i2c [non usato] - - namespace uart1 { - using tx = Gpio<GPIOA_BASE, 9>; - using rx = Gpio<GPIOA_BASE, 10>; - } //namespace uart1 - - namespace can { - using rx = Gpio<GPIOB_BASE, 8>; - using tx = Gpio<GPIOB_BASE, 9>; - } // namespace can } //namespace interfaces namespace actuators { - using abort1 = Gpio<GPIOA_BASE, 1>; - using ignition1 = Gpio<GPIOA_BASE, 2>; - using spare = Gpio<GPIOA_BASE, 3>; + using abortPin = Gpio<GPIOA_BASE, 1>; + using ignitionPin = Gpio<GPIOA_BASE, 2>; + using umbilicalPin = Gpio<GPIOA_BASE, 3>; } //namespace actuators diff --git a/miosix/config/Makefile.inc b/miosix/config/Makefile.inc index 96aa67de73f3a5a0272877a5aac7ad2c1e5841cc..e42c5d5f4bfed31a9caeb161863fcf73edccfe70 100644 --- a/miosix/config/Makefile.inc +++ b/miosix/config/Makefile.inc @@ -401,12 +401,12 @@ endif ## stm32f103c8_skyward_alderaan ## ifeq ($(OPT_BOARD),stm32f103c8_skyward_alderaan) + #LINKER_SCRIPT_PATH := arch/cortexM3_stm32/stm32f103c8_skyward_aldeeran/ ## Linker script type, there are two options ## 1) Code in FLASH, stack + heap in RAM ## 2) Code in FLASH, stack + heap in RAM flashing with bootloader - - #LINKER_SCRIPT := $(LINKER_SCRIPT_PATH)stm32_64k+20k_bootloader.ld + #LINKER_SCRIPT := $(LINKER_SCRIPT_PATH)stm32_64k+20k_rom.ld ## Select clock frequency CLOCK_FREQ := -DSYSCLK_FREQ_24MHz=24000000 @@ -1072,7 +1072,6 @@ else ifeq ($(ARCH),cortexM3_stm32) ## These are the files in arch/<arch name>/<board name> ARCH_SRC := \ $(BOARD_INC)/interfaces-impl/bsp.cpp \ - $(BOARD_INC)/interfaces-impl/hw_mapping.h \ ## Add a #define to allow querying board name CFLAGS_BASE += -D_BOARD_STM32F103C8_SKYWARD_ALDERAAN -DSTM32F10X_MD