Closed gicking closed 5 years ago
hi Hoel,
nice to hear that you like the patches :-)
Unfortunately I cannot comment on how to use an IDE. Also I have no STM8L101x3 board available, so I can only check the build step using 'make' or shell scripts, not the upload. Sorry!
Anyway, building programs is quite easy and should works the same way under MacOSX - or so I expect... You can either use make
- or the provided shell script. But before you start please assert that:
SDCC
, stm8flash (tool for upload via debug-I/F) and make
are installed in the $PATH
stm8flash
is working (I believe there are issues under MacOSX)To build e.g. example Project/STM8L10x_StdPeriph_Examples/GPIO/GPIO_IOToggle
perform the following steps:
Project/STM8L10x_StdPeriph_test
e.g. to Project/test
Project/STM8L10x_StdPeriph_Examples/GPIO/GPIO_IOToggle
to Project/test
test/SDCC/Makefile
SPL_SOURCE
(is dummy for GPIO_IOToggle
)test/SDCC
make
-> creates folder test/SDCC/STM8L10x
which contains hexfile STM8L10x.hex
stm8flash -c stlink -w ./STM8L10x/STM8L10x.hex -p stm8l101?3
-> uploads hexfile_UX_compile_run.sh
to _UX_compile_run.command
(see here)_UX_compile_run.sh
set location of stm8flash
for SWIM_LOADER
(or omit if in $PATH
)_UX_compile_run.*
or type in console (for debug) -> builds code and uploadsPS: just for completeness: for STM8 devices with serial bootloader you can also upload the code via UART, see e.g. here
Hello,
I came across your patch file for STM8L SPL, which is very neat, i successfully patched the SPL and i can see the generated template and project for SDCC, how do i use the provided makefile to build a project? i am usually using IDE (for example SW4STM32) so i am not used to makefiles at all. Should i drop the makefile in the STM8L10x_StdPeriph_test folder and issue « make » in the terminal after cd to the directory?
The platform is STM8L101x3 and the environment is OS X, i have SDCC installed and working, i can compile single file firmwares, i also have stm8flash installed and working. Ideally i would like to use this in Eclipse (which has the ddcc plugin installed) however the attempt (make new project from existing makefile) fails to compile, so if i could already compile from terminal it is fine for now.
Thank you in advance. Hoel