The idea is to teach programming using one project on an Arduino or STM32. Part of the idea is to enable them to develop and experiment with a more sophisticated project earlier in the course.
The students start with a small amount of source and some binary libraries, then eventually over the duration of the course, code all of the libraries themselves. So they have quite a lot of functionality, provided by binary libraries, from the start.
I’m wondering how to do this within the Arduino IDE. Its usual mode is to have all source code available, but that would defeat my purpose.
I suppose I could create a bunch of alternative ‘target board’ builds, but is there an easier way? Any suggestions?
GB-)
A bit more about the approach
After they get used to the IDE and syntax, I’ll give the students an almost complete program which uses several libraries. They will complete the program, and test it. This might be quite a small amount of code, but gives a quite big pay-off. They won’t have the source code for the libraries only the binaries. They will have the header files.
Then each session I’ll teach them more, enough to implement a library, then another, and so on, until they have learned to implement the whole program.
As an alternative approach, I might ask them to work in small teams to implement the libraries. As an extra task, I might even ask them to exchange one or more library implementations with other students or teams of students, and check that the program still works (working to spec.).
perhaps explaining the #if constructs (for me
also nasties like hardware timers, DHTnn interface ?
stephen
perhaps explaining the #if constructs (for me
also nasties like hardware timers, DHTnn interface ?
stephen
stephen
<…>
I’m wondering how to do this within the Arduino IDE. Its usual mode is to have all source code available, but that would defeat my purpose.
I suppose I could create a bunch of alternative ‘target board’ builds, but is there an easier way? Any suggestions?
<…>
There are details of how to configure np++ on the forums here, but the specific command line was:
“c:\Program Files (x86)\Arduino\arduino_debug.exe” –pref build.path=”$(CURRENT_DIRECTORY)/build” –verify “$(FULL_CURRENT_PATH)”
$(CURRENT_DIRECTORY) & $(FULL_CURRENT_PATH) being expansions made by np++
<…>
I’m wondering how to do this within the Arduino IDE. Its usual mode is to have all source code available, but that would defeat my purpose.
I suppose I could create a bunch of alternative ‘target board’ builds, but is there an easier way? Any suggestions?
<…>
There are details of how to configure np++ on the forums here, but the specific command line was:
“c:\Program Files (x86)\Arduino\arduino_debug.exe” –pref build.path=”$(CURRENT_DIRECTORY)/build” –verify “$(FULL_CURRENT_PATH)”
$(CURRENT_DIRECTORY) & $(FULL_CURRENT_PATH) being expansions made by np++
There are details of how to configure np++ on the forums here, but the specific command line was:
“c:\Program Files (x86)\Arduino\arduino_debug.exe” –pref build.path=”$(CURRENT_DIRECTORY)/build” –verify “$(FULL_CURRENT_PATH)”
$(CURRENT_DIRECTORY) & $(FULL_CURRENT_PATH) being expansions made by np++
There are details of how to configure np++ on the forums here, but the specific command line was:
“c:\Program Files (x86)\Arduino\arduino_debug.exe” –pref build.path=”$(CURRENT_DIRECTORY)/build” –verify “$(FULL_CURRENT_PATH)”
$(CURRENT_DIRECTORY) & $(FULL_CURRENT_PATH) being expansions made by np++
stephen
Trying to put compiled ‘.o’ files in a temporary directory has a serious downside. Somehow I’ll need to have my software installed on all of the machines being used, which might be too tricky.
However, maybe there’s an alternative, potential, solution.
The idea is to initialise some arrays with the actual (hex) code of the library functions, and use a few pragmas/compile-time directives to have those arrays placed into the text (code) segment of the linked program.
To get the linker to work, I think the arrays would need to either have the same names as the function names, or the entire .o file would need to be within an array. I don’t know which would be a more likely approach.
Has anyone ever tried to embed code using initialised data and nifty use of the compiler directives?
I just took a class at Cabrillo College in Santa Cruz California on Arduino Uno based C++
here is a link https://sites.google.com/a/cabrillo.edu … 7/schedule
I will forward the link to your post to the teacher of the class and hope to create a beneficial connection for both of you
Hans


