DEV Community

Discussion on: Space, The Final Deployment!

Collapse
 
phlash profile image
Phil Ashby

Interesting question! We chose to work with the supported tooling for the MCU (MetroWorks Code Warrior for MCUs, which supports C/C++ and ASM), and didn't really consider anything else. CW4MCUs also comes with the Processor Expert device driver templates, giving us tested hardware access code (yes, we are lazy and risk averse :))

I briefly looked at SDCC as an open source toolchain alternative, because CW4MCUs is bloated Windows-only goop. I got a demo program to boot then the team reminded me they all used Windows, it was just me on Linux being weird.

I should note that we found two compiler bugs during development, one issue with the optimiser (register aliasing two variables together), another with 'smart' parameter passing conflicting with C permitting calls to functions without prototypes, oh the joy of stepping through assembly :)

A brief search for 8-bit Ada tooling only find Ada for AVR targets, although GNAT might be able to generate HCS08 output, looks like they aren't popular devices for missile guidance or medical gear.

Collapse
 
nestedsoftware profile image
Nested Software • Edited

Ah, that makes sense. At reddit a user linked to the following video based on a cubesat deployed by a college in vermont:

blog.adacore.com/carl-brandon-vid

On closer inspection, the hardware they are using is on a totally different scale though. Toward the end of the video, they mention a proton 400k. I looked this up ( cubesatlab.org/IceCube-Hardware.jsp ) and it appears to have a dual core powerpc CPU running at 1GHz.

You guys were operating with something not so far from Apple II hardware, though about 10 times the clock speed thankfully, so probably C/ASM would be the only realistic option! I should have noticed that in your post myself - sorry about that!

Thread Thread
 
phlash profile image
Phil Ashby

Yup - I went and found the Reddit post (thank you for the publicity), would have replied but I'm not a Reddit user (and not sure I wish to be!) Their target system for the first satellite (cubesatlab.org/BasicLEO.jsp) was a TI MSP430, which is a 16-bit CPU, with 16k+ RAM. Later work used larger devices.

Also their toolchain was interesting: since there is no native Ada/Spark compiler for MSP430 they transpiled to C... underpinned by ~2k lines of driver code in C.

We have ~10k lines of C (including comments) in the latest build for JY1SAT.