Live data from Hacker News

Make with Ada: ARM Cortex-M CNC controller

blog.adacore.com

1–10 of 14 posts

Re: Make with Ada: ARM Cortex-M CNC controller

#2
Funny, I wanted to do the same stuff on the same board by converting my current C implementation to Ada, it ended up in a disaster, the compiler wouldn't run on my mac (so I used a linux simulator), the real-time feature of Ada were actually clocked on a fixed SYSTICK, and most of the Ada tools were randomly crashing.

the plugin I started writing at the time: https://github.com/nraynaud/ada-intellij

The code I wanted to convert: https://github.com/nraynaud/webgcode/tree/gh-pages/interpola...

where I threw the towel: https://github.com/nraynaud/bldc_ada

Re: Make with Ada: ARM Cortex-M CNC controller

#3
post #2

Funny, I wanted to do the same stuff on the same board by converting my current C implementation to Ada, it ended up in a disaster, the compiler wouldn't run on my mac (so I used a linux simulator), the real-time feature of Ada were actually clocked on a fixed SYSTICK, and most of the Ada tools were randomly crashing. the plugin I started writing at the time: https://github.com/nraynaud/ada-intellij The code I wanted…

When was this? The tools working for me (either Linux or Windows). In fact we released a new version today: http://libre.adacore.com/download/configurations

And we are also working on a bare-metal driver library for ARM Cortex-M. Have a look: https://github.com/AdaCore/Ada_Drivers_Library

Re: Make with Ada: ARM Cortex-M CNC controller

#5
post #2

Funny, I wanted to do the same stuff on the same board by converting my current C implementation to Ada, it ended up in a disaster, the compiler wouldn't run on my mac (so I used a linux simulator), the real-time feature of Ada were actually clocked on a fixed SYSTICK, and most of the Ada tools were randomly crashing. the plugin I started writing at the time: https://github.com/nraynaud/ada-intellij The code I wanted…

Hey, I know you :) I used your web Gcode simulator a lot: https://nraynaud.github.io/webgcode/

Re: Make with Ada: ARM Cortex-M CNC controller

#6

Author should check out http://camotics.org/ It's an Opens-Source 3-axis CNC simulator that runs on Mac, Windows and Linux. It not only shows you a visualization of the tool paths but also the resulting cut workpiece. Disclaimer, I'm the author of CAMotics.

Author is aware that there are many Gcode simulators.The specificity of this one, thanks to Ada portability, is that the simulator code is 100% the same as the code running in the embedded controller.

Re: Make with Ada: ARM Cortex-M CNC controller

#7
post #6

Author should check out http://camotics.org/ It's an Opens-Source 3-axis CNC simulator that runs on Mac, Windows and Linux. It not only shows you a visualization of the tool paths but also the resulting cut workpiece. Disclaimer, I'm the author of CAMotics.

Author is aware that there are many Gcode simulators.The specificity of this one, thanks to Ada portability, is that the simulator code is 100% the same as the code running in the embedded controller.

No other Open-Source GCode "simulators", as far as I know, simulate the actual cut.

Re: Make with Ada: ARM Cortex-M CNC controller

#8
Some questions come to mind:

- Can it not accelerate smoothly? The graph on the page seems to imply that.

- Also on that graph, the relation between distance and speed on accelerated parts appears to be linear, but, if this is supposed to approximate constant acceleration, the relation between distance and speed squared would be linear (v^2=v0^2+2ad).

- Why did they need to develop that GUI, when there's existing software available? E.g. Pronterface. edit I see it's also a simulator so that makes sense.

On the other hand, I really like such proof-of-concept projects, small enough to understand but large enough that you can see the patterns. One can learn a lot from them, and I'll be sure to check out the code some day :)

On a related note, some shameless self-promotion: my APrinter[1] project is an open-source firmware for CNC devices, is highly portable running on many chips including STM32F4.

[1] https://github.com/ambrop72/aprinter

Re: Make with Ada: ARM Cortex-M CNC controller

#9
On the topic of safe languages on embedded systems, I'm very excited for the future of Rust on micros. Having just recently spent probably in excess of 100 hours on an embedded systems project at university, I'm starting to get a bit annoyed with using embedded C.

I'm sure good software engineering practices would eliminate a lot of my problems, but being the only computer scientist in a group of electrical engineer has made my life difficult. The entire project is just a massive mess of cascading makefiles and #defines, and is amazingly poorly documented.

A lot of the code was supplied by our lecturer, and has no documentation whatsoever, and he's gone and made this arcane cascading set of makefiles that goes about 4 levels deep.

Re: Make with Ada: ARM Cortex-M CNC controller

#10
post #5
post #2

Funny, I wanted to do the same stuff on the same board by converting my current C implementation to Ada, it ended up in a disaster, the compiler wouldn't run on my mac (so I used a linux simulator), the real-time feature of Ada were actually clocked on a fixed SYSTICK, and most of the Ada tools were randomly crashing. the plugin I started writing at the time: https://github.com/nraynaud/ada-intellij The code I wanted…

Hey, I know you :) I used your web Gcode simulator a lot: https://nraynaud.github.io/webgcode/

funny, I never really used it myself, but I got a few people telling me they use it :)
Post reply on HN