garyren / Grbl-ARM7

Grbl to ARM7
9 stars 5 forks source link

Port to AT91SAM7X512 #1

Open 1bigpig opened 11 years ago

1bigpig commented 11 years ago

Garyren,

I am hoping to port your grbl-arm7 over to an older Netduino/Atmel SAM7X Arm processor and to be honest, am in over my head. I have done a little work on grbl and on the AVR but nothing on an ARM before. I want to programming the Netduino in native ARM code, not .NET so I am going to use the WinARM toolchain you recommended.

I liked the fact that you have already pulled all the AVR specific dependencies from the grbl code base but I am not sure what is ARM specific and what is NXP LPC2106 specific.

If you could help with any suggestions or points to help get me started, I would REALLY appriciate it. I know that I already have one thing that I started working on last night was the SAM7X has no eeprom, so I am trying to make some code changes to support that.

Thanks,

Bruce

garyren commented 11 years ago

Hi Bruce, your SAM7X is an ARM7TDMI like the LPC2106... so it's really peripheral items that will be different (timers, i/o ports, UARTs, etc). I would probably start by first getting a simple hello world type app running on your processor (not sure if WinARM has one in the examples folder for your chip). Once that's running, you can use that as a starting point to integrate the grbl code into it. Ignore the EEPROM for now (I added an external EEPROM to my processor which you can also do). You can stub out those routines to get going. Look at how the i/o ports work on your chip, and also the timers, and the UART (find sample code to help port those parts).

Not much is ARM specific other than the interrupt controller, which is the same (I think) for your chip).

Good luck, Gary

1bigpig commented 11 years ago

Gary,

Thank you for providing me a good starting point. I did try the WinArm example, but they do not include the headers or linker scripts for the Atmel SAX7X512 chip. I was able to locate them elsewhere but was unable to make the sample AT91SAM7s64 "hello world" example run on my board, but at least it did compile AND I was able to get it to upload. So, I think I am on the right track (just gotta make sure I don't get hit by the train...)

I did see that someone has setup YAGARTO for my exact board and has some sample projects. So, I think I will get through those examples, and then take what I have learned and start working on converting your code to my board.

I guess this is way in the future stuff, but would you rather I just fork your code or do like they have done with the Grbl code and use one code base but Ifdef the code for different processors/boards? I have feeling that your code base will probably be the base for the code they use on the Arduino Due board.

Thanks for helping me out and I am sure I will be back with LOTS of questions...

Bruce PS what type of machine do you have? If you would rather take this offline, my email is bwclark1 at gmail