atomicobject / heatshrink

data compression library for embedded/real-time systems
ISC License
1.31k stars 176 forks source link

Added test project for STM32F401 microcontroller #58

Open siorpaes opened 4 years ago

siorpaes commented 4 years ago

Hello,

I just added a test project for popular STM32F401 microcontroller which decodes a test file and computes its md5 checksum for reference. The project is based on Keil and can easily be adapted to other ST microcontrollers and IDEs using CubeMX.

silentbicycle commented 3 years ago

I'm hesitant to vendor all the generated drivers/etc. into this repo, since it's quite a lot of files for a very specific example. This might be better off as a separate project?

BenBE commented 3 years ago

The only things required to generate those vendored driver files is test_heatshrink_stm32f401.ioc and the heatshrink directory. If additionally you could tell CubeMX to not generate the main function itself you could separate out the demo source completely, which would make the demo much more versatile.

Also there are several places in the code that are technically unsatisfactory, like header files missing proper include guards, inconsistent indentation, mixing of several external libraries, much too broad configuration of the MCU (why configure the CAN bus if you're not using it?) and many other things. Last but not least, there's some system-specific pathnames in the .mxproject file, which like most other dot files shouldn't under version control to begin with.