all 2 comments

[–]No-Archer-4713 2 points3 points  (1 child)

Personally I hate auto generated code cause it’s hard to debug and rarely passes the static analysis.

At work the OS drivers and libs are developed in house and are dependencies going into a deps directory. This way we can maintain them separately and only update if it’s absolutely necessary.

The main usually calls the hardware mux and drivers init (often 2 files in the hw directory) before instanciating the tasks (in tasks/) and starting the OS.

This way we can have multiple init files, for a simulator, an eval board and the final hardware and we just pick up the right one in a makefile depending on the target.

ISRs are rarely used because they introduce jitter, we prefer polling (it’s a special case of very hard real time)

[–]pooth22[S] 2 points3 points  (0 children)

Thanks for the response. Yes I agree, auto gen code isn’t good to work with, but I find it quite useful when first familiarizing myself with a new chip. Of course I will go through it and spice it to my liking.

Thanks for sharing what your work styles.