Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • avn/swd/skyward-boardcore
  • emilio.corigliano/skyward-boardcore
  • nicolo.caruso/skyward-boardcore
  • ettore.pane/skyward-boardcore
  • giulia.facchi/skyward-boardcore
  • valerio.flamminii/skyward-boardcore
6 results
Show changes
Showing
with 141 additions and 140 deletions
......@@ -55,11 +55,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -31,4 +31,4 @@
#define RCC_SYNC() __DSB() // Workaround for a bug in stm32f42x
#endif // ARCH_REGISTERS_IMPL_H
\ No newline at end of file
#endif // ARCH_REGISTERS_IMPL_H
......@@ -62,29 +62,29 @@ void IRQbspInit()
using namespace interfaces;
debug::rx::mode(Mode::ALTERNATE);
debug::rx::alternateFunction(8);
debug::tx::mode(Mode::ALTERNATE);
debug::rx::mode(Mode::ALTERNATE);
debug::tx::alternateFunction(8);
debug::tx::mode(Mode::ALTERNATE);
cam1::rx::mode(Mode::ALTERNATE);
cam1::rx::alternateFunction(7);
cam1::tx::mode(Mode::ALTERNATE);
cam1::rx::mode(Mode::ALTERNATE);
cam1::tx::alternateFunction(7);
cam1::tx::mode(Mode::ALTERNATE);
cam2::tx::mode(Mode::ALTERNATE);
cam2::tx::alternateFunction(8);
cam2::tx::mode(Mode::ALTERNATE);
cam3::tx::mode(Mode::ALTERNATE);
cam3::tx::alternateFunction(8);
cam3::tx::mode(Mode::ALTERNATE);
camMosfet::mode(Mode::OUTPUT);
camMosfet::low();
can1::rx::mode(Mode::ALTERNATE);
can1::rx::alternateFunction(9);
can1::tx::mode(Mode::ALTERNATE);
can1::rx::mode(Mode::ALTERNATE);
can1::tx::alternateFunction(9);
can1::tx::mode(Mode::ALTERNATE);
using namespace leds;
......
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -55,11 +55,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -214,56 +214,50 @@ void IRQbspInit()
using namespace interfaces;
spi1::sck::mode(Mode::ALTERNATE);
spi1::sck::alternateFunction(5);
spi1::miso::mode(Mode::ALTERNATE);
spi1::sck::mode(Mode::ALTERNATE);
spi1::miso::alternateFunction(5);
spi1::mosi::mode(Mode::ALTERNATE);
spi1::miso::mode(Mode::ALTERNATE);
spi1::mosi::alternateFunction(5);
spi1::mosi::mode(Mode::ALTERNATE);
spi2::sck::mode(Mode::ALTERNATE);
spi2::sck::alternateFunction(5);
spi2::miso::mode(Mode::ALTERNATE);
spi2::sck::mode(Mode::ALTERNATE);
spi2::miso::alternateFunction(5);
spi2::mosi::mode(Mode::ALTERNATE);
spi2::miso::mode(Mode::ALTERNATE);
spi2::mosi::alternateFunction(5);
spi2::mosi::mode(Mode::ALTERNATE);
spi4::sck::mode(Mode::ALTERNATE);
spi4::sck::alternateFunction(5);
spi4::miso::mode(Mode::ALTERNATE);
spi4::sck::mode(Mode::ALTERNATE);
spi4::miso::alternateFunction(5);
spi4::mosi::mode(Mode::ALTERNATE);
spi4::miso::mode(Mode::ALTERNATE);
spi4::mosi::alternateFunction(5);
spi4::mosi::mode(Mode::ALTERNATE);
spi5::sck::mode(Mode::ALTERNATE);
spi5::sck::alternateFunction(5);
spi5::miso::mode(Mode::ALTERNATE);
spi5::sck::mode(Mode::ALTERNATE);
spi5::miso::alternateFunction(5);
spi5::mosi::mode(Mode::ALTERNATE);
spi5::miso::mode(Mode::ALTERNATE);
spi5::mosi::alternateFunction(5);
spi5::mosi::mode(Mode::ALTERNATE);
spi6::sck::mode(Mode::ALTERNATE);
spi6::sck::alternateFunction(5);
spi6::miso::mode(Mode::ALTERNATE);
spi6::sck::mode(Mode::ALTERNATE);
spi6::miso::alternateFunction(5);
spi6::mosi::mode(Mode::ALTERNATE);
spi6::miso::mode(Mode::ALTERNATE);
spi6::mosi::alternateFunction(5);
spi6::mosi::mode(Mode::ALTERNATE);
uart1::rx::mode(Mode::ALTERNATE);
uart1::rx::alternateFunction(7);
uart1::tx::mode(Mode::ALTERNATE);
uart1::rx::mode(Mode::ALTERNATE);
uart1::tx::alternateFunction(7);
uart1::tx::mode(Mode::ALTERNATE);
can1::rx::mode(Mode::ALTERNATE);
can1::rx::alternateFunction(9);
can1::tx::mode(Mode::ALTERNATE);
can1::rx::mode(Mode::ALTERNATE);
can1::tx::alternateFunction(9);
timers::tim4ch2::mode(Mode::ALTERNATE);
timers::tim11ch1::mode(Mode::ALTERNATE);
timers::tim3ch1::mode(Mode::ALTERNATE);
timers::tim10ch1::mode(Mode::ALTERNATE);
timers::tim8ch1::mode(Mode::ALTERNATE);
can1::tx::mode(Mode::ALTERNATE);
timers::tim4ch2::alternateFunction(2);
timers::tim11ch1::alternateFunction(3);
......@@ -271,6 +265,12 @@ void IRQbspInit()
timers::tim10ch1::alternateFunction(3);
timers::tim8ch1::alternateFunction(3);
timers::tim4ch2::mode(Mode::ALTERNATE);
timers::tim11ch1::mode(Mode::ALTERNATE);
timers::tim3ch1::mode(Mode::ALTERNATE);
timers::tim10ch1::mode(Mode::ALTERNATE);
timers::tim8ch1::mode(Mode::ALTERNATE);
using namespace sensors;
ADS131_1::cs::mode(Mode::OUTPUT);
ADS131_1::cs::high();
......
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -71,11 +71,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -77,10 +77,15 @@ void IRQbspInit()
ledOn();
delayMs(100);
ledOff();
auto tx = Gpio<GPIOD_BASE, 8>::getPin();
tx.alternateFunction(7);
auto rx = Gpio<GPIOD_BASE, 9>::getPin();
rx.alternateFunction(7);
// rx and tx alternate function is set here, mode will be set by the
// STM32Serial class later on
DefaultConsole::instance().IRQset(intrusive_ref_ptr<Device>(
new STM32Serial(3, defaultSerialSpeed, tx, rx)));
}
......
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -49,8 +49,7 @@ void program_startup()
// enabled
__disable_irq();
miosix::IRQconfigureCache((const unsigned int *)0xd0000000,
8 * 1024 * 1024);
miosix::IRQconfigureCache((const unsigned int*)0xd0000000, 8 * 1024 * 1024);
// These are defined in the linker script
extern unsigned char _etext asm("_etext");
......@@ -60,11 +59,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -232,41 +232,41 @@ void IRQbspInit()
userSwitch::mode(Mode::INPUT);
using namespace interfaces;
spi1::sck::mode(Mode::ALTERNATE);
spi1::sck::alternateFunction(5);
spi1::miso::mode(Mode::ALTERNATE);
spi1::sck::mode(Mode::ALTERNATE);
spi1::miso::alternateFunction(5);
spi1::mosi::mode(Mode::ALTERNATE);
spi1::miso::mode(Mode::ALTERNATE);
spi1::mosi::alternateFunction(5);
spi1::mosi::mode(Mode::ALTERNATE);
spi3::sck::mode(Mode::ALTERNATE);
spi3::sck::alternateFunction(6);
spi3::miso::mode(Mode::ALTERNATE);
spi3::sck::mode(Mode::ALTERNATE);
spi3::miso::alternateFunction(6);
spi3::mosi::mode(Mode::ALTERNATE);
spi3::miso::mode(Mode::ALTERNATE);
spi3::mosi::alternateFunction(5);
spi3::mosi::mode(Mode::ALTERNATE);
spi4::sck::mode(Mode::ALTERNATE);
spi4::sck::alternateFunction(5);
spi4::miso::mode(Mode::ALTERNATE);
spi4::sck::mode(Mode::ALTERNATE);
spi4::miso::alternateFunction(5);
spi4::mosi::mode(Mode::ALTERNATE);
spi4::miso::mode(Mode::ALTERNATE);
spi4::mosi::alternateFunction(5);
spi4::mosi::mode(Mode::ALTERNATE);
can2::rx::mode(Mode::ALTERNATE);
can2::rx::alternateFunction(9);
can2::tx::mode(Mode::ALTERNATE);
can2::rx::mode(Mode::ALTERNATE);
can2::tx::alternateFunction(9);
can2::tx::mode(Mode::ALTERNATE);
usart1::tx::mode(Mode::ALTERNATE);
usart1::tx::alternateFunction(7);
usart1::rx::mode(Mode::ALTERNATE);
usart1::tx::mode(Mode::ALTERNATE);
usart1::rx::alternateFunction(7);
usart1::rx::mode(Mode::ALTERNATE);
usart2::tx::mode(Mode::ALTERNATE);
usart2::tx::alternateFunction(7);
usart2::rx::mode(Mode::ALTERNATE);
usart2::tx::mode(Mode::ALTERNATE);
usart2::rx::alternateFunction(7);
usart2::rx::mode(Mode::ALTERNATE);
using namespace radio;
cs::mode(Mode::OUTPUT);
......@@ -278,10 +278,10 @@ void IRQbspInit()
rx_enable::mode(Mode::OUTPUT);
using namespace timers;
tim3ch2::mode(Mode::ALTERNATE);
tim3ch2::alternateFunction(2);
tim4ch1::mode(Mode::ALTERNATE);
tim3ch2::mode(Mode::ALTERNATE);
tim4ch1::alternateFunction(2);
tim4ch1::mode(Mode::ALTERNATE);
stepper1::enable::mode(Mode::OUTPUT);
stepper1::direction::mode(Mode::OUTPUT);
......
......@@ -130,4 +130,4 @@ using intr = Gpio<GPIOC_BASE, 1>;
using nrst = Gpio<GPIOB_BASE, 1>;
} // namespace ethernet
} // namespace miosix
\ No newline at end of file
} // namespace miosix
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -49,8 +49,7 @@ void program_startup()
// enabled
__disable_irq();
miosix::IRQconfigureCache((const unsigned int *)0xd0000000,
8 * 1024 * 1024);
miosix::IRQconfigureCache((const unsigned int*)0xd0000000, 8 * 1024 * 1024);
// These are defined in the linker script
extern unsigned char _etext asm("_etext");
......@@ -60,11 +59,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -49,8 +49,7 @@ void program_startup()
// enabled
__disable_irq();
miosix::IRQconfigureCache((const unsigned int *)0xd0000000,
8 * 1024 * 1024);
miosix::IRQconfigureCache((const unsigned int*)0xd0000000, 8 * 1024 * 1024);
// These are defined in the linker script
extern unsigned char _etext asm("_etext");
......@@ -60,11 +59,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -232,9 +232,9 @@ void configureBackupSram()
extern unsigned char _preserve_end asm("_preserve_end");
extern unsigned char _preserve_load asm("_preserve_load");
unsigned char *preserve_start = &_preserve_start;
unsigned char *preserve_end = &_preserve_end;
unsigned char *preserve_load = &_preserve_load;
unsigned char* preserve_start = &_preserve_start;
unsigned char* preserve_end = &_preserve_end;
unsigned char* preserve_load = &_preserve_load;
// Load the .preserve section from flash if not a software reset
if (miosix::lastResetReason() != miosix::ResetReason::SOFTWARE)
......
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -49,8 +49,7 @@ void program_startup()
// enabled
__disable_irq();
miosix::IRQconfigureCache((const unsigned int *)0xd0000000,
8 * 1024 * 1024);
miosix::IRQconfigureCache((const unsigned int*)0xd0000000, 8 * 1024 * 1024);
// These are defined in the linker script
extern unsigned char _etext asm("_etext");
......@@ -60,11 +59,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......