DISTORTEC / distortos

object-oriented C++ RTOS for microcontrollers
https://distortos.org/
Mozilla Public License 2.0
434 stars 67 forks source link

STM32L0 support #35

Closed CezaryGapinski closed 7 years ago

CezaryGapinski commented 7 years ago

Added support for STM32L0 family.

FreddieChopin commented 7 years ago

If I enable "everything" (the last chip, all clock options, all peripherals, ...), I get following error:

[ 17%] CXX     source/chip/STM32/STM32L0/STM32L0-lowLevelInitialization.cpp
source/chip/STM32/STM32L0/STM32L0-lowLevelInitialization.cpp: In function 'void distortos::chip::lowLevelInitialization()':
source/chip/STM32/STM32L0/STM32L0-lowLevelInitialization.cpp:61:14: error: 'enableHsi48' was not declared in this scope
  enableHsi48();
              ^
make: *** [Makefile:246: output/source/chip/STM32/STM32L0/STM32L0-lowLevelInitialization.o] Error 1

The config file which I used is attached (change extension from .mk.txt to .mk) distortosConfiguration.mk.txt

CezaryGapinski commented 7 years ago

Further to changes from STM32F0 enableHsi48 I prepared patch in last commit. Let me know if it is correct, then I will squash it to base commits.

STM32L083V8 has just 64 KB of flash memory, so test application won't compile.

FreddieChopin commented 7 years ago

STM32L083V8 has just 64 KB of flash memory, so test application won't compile.

Chips should be listed in alphabetical order, so the one which I selected should actually be third from the end, with ...VZ as the last one. I've noticed that the order is wrong in several other places.

Further to changes from STM32F0 enableHsi48 I prepared patch in last commit. Let me know if it is correct, then I will squash it to base commits.

This patch fixes the problem (;

CezaryGapinski commented 7 years ago

Chips should be listed in alphabetical order, so the one which I selected should actually be third from the end, with ...VZ as the last one. I've noticed that the order is wrong in several other places.

Ok, now it should be in alphabetical order ;).

FreddieChopin commented 7 years ago

Merged with one very minor change to getBusFrequency.hpp file (/** ... */ -> /// ...).

Thanks! Now I hope to see a pull request with a new board (;