va3wam / TWIPe

This repository contains the embedded code used for the TWIPe robot
MIT License
2 stars 0 forks source link

Break up the monolithic code base into separate pieces #100

Open va3wam opened 3 years ago

va3wam commented 3 years ago

Make use of linker to merge multiple modules. Use named code sections to enable modularization.

nerdoug commented 3 years ago

named code sections doesn't seem to be feasible in the C++ compiler that VSC/PIO use. We can use libraries as a model where: .h file has extern statements that specify format of routine calls. This removes the need to have an extern statement in every module that calls a given routine, which enforces consistency. .cpp files contain actual routine code

Can have multiple routines per module, notably routine(s) to be called from setup, plus one or more routines to be called somewhere within loop().

va3wam commented 3 years ago

Ok thanks Doug. I have some libraries going to show you on Wednesday.

Andrew

On Jan 11, 2021, at 6:58 PM, Doug Elliott VA3DAE notifications@github.com wrote:

 named code sections doesn't seem to be feasible in the C++ compiler that VSC/PIO use. We can use libraries as a model where: .h file has extern statements that specify format of routine calls. This removes the need to have an extern statement in every module that calls a given routine, which enforces consistency. .cpp files contain actual routine code

Can have multiple routines per module, notably routine(s) to be called from setup, plus one or more routines to be called somewhere within loop().

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.