FiveD_on_Arduino icon indicating copy to clipboard operation
FiveD_on_Arduino copied to clipboard

Cleanup of simulation code

Open sw opened this issue 14 years ago • 3 comments

Hi, since Traumflug said that keeping the simulation code in the same directory causes trouble with the Arduino IDE, I moved all simulation code into a sub-directory. I also cleaned up the firmware code to use less #ifdefs. Also I fixed a timer bug in the simulation code.

I'm new to Git and I can't figure out why there are now six commits instead of a single one. It should be the one labelled 009faa2a.

I am currently playing around with plotting data from the simulation so that we can see speed and acceleration curves but that code is not ready yet.

Regards, Stephan

sw avatar Oct 23 '10 22:10 sw

I'm fairly new to git too.. all those extra commits are from merging into upstream. I've learned from traumflug that it's much cleaner to keep a branch in sync with upstream as fast-forward updates don't show up as commits, and keep local changes in a separate branch which you then cherry-pick across to the sync branch in between git pull and git push, then rebase your local against the sync to complete moving the commits from one to the other.

triffid avatar Oct 24 '10 00:10 triffid

~/FiveD_on_Arduino/simulation $ make make: Circular serial.o <- config.h dependency dropped. make: Circular dda.o <- config.h dependency dropped. make: Circular gcode_parse.o <- config.h dependency dropped. make: Circular gcode_process.o <- config.h dependency dropped. make: Circular clock.o <- config.h dependency dropped. make: Circular timer.o <- config.h dependency dropped. make: Circular temp.o <- config.h dependency dropped. make: Circular sermsg.o <- config.h dependency dropped. make: Circular dda_queue.o <- config.h dependency dropped. make: Circular watchdog.o <- config.h dependency dropped. make: Circular debug.o <- config.h dependency dropped. make: Circular sersendf.o <- config.h dependency dropped. make: Circular heater.o <- config.h dependency dropped. make: Circular analog.o <- config.h dependency dropped. make: Circular delay.o <- config.h dependency dropped. CC mendel.o ../mendel.c: In function 'io_init': ../mendel.c:31: warning: implicit declaration of function 'MASK' CC serial.o CC dda.o ../dda.c: In function 'dda_create': ../dda.c:234: warning: implicit declaration of function 'WRITE' ../dda.c:234: error: 'DIO9' undeclared (first use in this function) ../dda.c:234: error: (Each undeclared identifier is reported only once ../dda.c:234: error: for each function it appears in.) ../dda.c:234: warning: implicit declaration of function 'SET_OUTPUT' ../dda.c: In function 'dda_start': ../dda.c:396: error: 'DIO9' undeclared (first use in this function) ../dda.c:399: error: 'AIO1' undeclared (first use in this function) ../dda.c:400: error: 'AIO4' undeclared (first use in this function) ../dda.c:401: error: 'DIO3' undeclared (first use in this function) ../dda.c:402: error: 'DIO8' undeclared (first use in this function) ../dda.c: In function 'dda_step': ../dda.c:426: error: 'AIO0' undeclared (first use in this function) ../dda.c:441: error: 'AIO3' undeclared (first use in this function) ../dda.c:456: error: 'DIO2' undeclared (first use in this function) ../dda.c:470: error: 'DIO7' undeclared (first use in this function) make: *** [dda.o] Error 1

need to override dda.c too I think, or at least override a ton of macros. those errors will be coming from stuff like power_on() and x_direction() and x_step() and similar- things from arduino.h.. maybe overriding arduino.h would work better?

triffid avatar Oct 24 '10 00:10 triffid

Triffid, you need to run "make sim". I included the original Makefile and if you just run "make", it will try to build a hex file from the x86 code...

sw avatar Oct 24 '10 09:10 sw