TG9541 / stm8ef

STM8 eForth - a user friendly Forth for simple µCs with docs
https://github.com/TG9541/stm8ef/wiki
Other
314 stars 66 forks source link

Re-order C-Stub infrastructure #379

Closed TG9541 closed 3 years ago

TG9541 commented 4 years ago

Some stuff is hardcoded in main.c, which is more a linker configuration in STM8 eForth proper but which might take a completely different role in downstream projects. Moving all constants and the ISR prototypes to forth.h, and moving that file to ./inc would make creating solutions like the one for #375 easier to create and to maintain.

TG9541 commented 3 years ago

Moving the C ISR protypes, only needed for the STM8 eForth "simulated serial" and "background task" interrupt handlers, from main.c to forth.h offers some interesting configuration options. I made a test with the STM8L RTC/Wakeup-Timer (#375) which worked out very well: TIM2/TIM3 ISR prototypes were removed, a modified version of bgtask.inc was created etc,

All the details and code are in the Gist STM8L051F3: Experimenting with a low-power console .