Using kaitai struct on stm32

229 Views Asked by At

Has anyone used kaitai struct on STM32 processor familly? I would like to use it to parse data from serial port and I am a little bit lost.

1

There are 1 best solutions below

0
On

Did you read the documentation? never heard about this before, but for what I saw: first, you need your project to be coded in C++ to be able to include the compiled kaitai files (your compiled format), then you need to define the standard stream (which is used by the kaitai) input to your datasource (could be your serial or even a ring buffer) here is how you set your datasource: https://formats.kaitai.io/bmp/cpp_stl.html

Also, check this first anwer of how to change the stdin and stdout of the C runtime: https://electronics.stackexchange.com/questions/206113/how-do-i-use-the-printf-function-on-stm32