Is AVR or M4 Programming Possible from RISC OS?
Glen Walker (2585) 469 posts |
I had a hunt around The Internet but most of the guides out there used Windows or Linux. I’ve used Linux to do quite a bit of programming on M4 chips using GDB/GCC/OpenOCD. If I wanted to program an embedded board—e.g., an AVR one: https://www.pjrc.com/teensy/ or a Cortex M4 one: https://www.olimex.com/Products/ARM/NXP/LPC-H2106/ Has that sort of thing ever been done on RISC OS? If anyone isn’t familiar with what I’m asking its basically:
|
Sprow (202) 1158 posts |
Slightly left of field, but if you’re happy to stretch to a PIC micro then my PIC suite could be worth a look. The main differences to your list is it’s not an AVR or an M4, and it’s assembler rather than C, but the PIC only has 35 instructions so doesn’t require much brain juice to remember. The programmer hardware needs a parallel port, so that’s IOMD or Iyonix (with parallel PCI card) or Titanium (with parallel PCIe card). |
Glen Walker (2585) 469 posts |
The template code I’ve got is for an AVR and all my experience is on an M4 (variants from STM and also NXP/Freescale). I don’t mind re-writing it for a PIC if that is what is required and will definitely explore all options right now!
I’m on Raspberry Pi’s so my options there are use the parallel port of a Linux machine and RDP/VNC into it (in which case I might as well just use my old toolchain) or a USB parallel port. I would love to buy a Titanium (and one is definitely on my fantasy shopping list) but I have other things to spend pennies on first. Do USB parallel port adapters work on RISC OS? |
David Boddie (1934) 222 posts |
The LPC-H2106 is ARM-based, so I would hope that it would be fairly simple to use a native RISC OS port of GCC to develop for it. For the AVR boards, surely someone could feed gcc-avr and avr-libc through the autobuilder to get binaries. |
Glen Walker (2585) 469 posts |
Just resurrecting this after a short while away and considering all my options. In the interrim I have done a bit of research and actually landed myself a job programming PIC microcontrollers! All in C though and from Linux but it does make me think about my options. I am not averse to learning assembler so am still considering the PICSuite (if I can get it working from a Raspberry Pi that is…) Going back to the original topic and expanding it to include PIC as well I think I have two issues. (a) The compiler and (b) the programmer. The Compiler
The Programmer Also, I would need to then port the desktop client (assuming I can get the source code) Just considering ARM for a moment, I have programmed most of my previous stuff using the GCC compiler, OpenOCD and a JTAG programmer. Anyone know of any effort that has been made to port part of this toolchain to RISC OS? Am I correct in assuming that the GCC port to RISC OS doesn’t actually include the embedded stuff? Of course the other alternative is to go back to assembler and the PICSuite which comes with a programmer…if I can find a suitable USB parallel port. |
Ian Karley (65) 30 posts |
I can recommend Sprow’s PIC suite it works well, I have used it for several projects. If you fancy attempting things from an alternative angle I have a 3/4 finished RISC OS port of Great Cow BASIC which is a compiling BASIC for AVR and PIC which anyone competent with BBC BASIC would have no trouble using. I am trying to get motivated to finishing this off so if anyone is interested in using this please speak up! |
Glen Walker (2585) 469 posts |
Certainly does sound interesting! I don’t know any assembly or BBC BASIC really (well I know bits but not enough to say I could actually write a program in it). I think what-ever route I take there will be some considerable learning involved but I’m looking for something that will help me develop a few new skills anyway… I’ve been chatting with Sprow and the sticky issue for me right now is that I don’t have a hardware parallel port and my only options seem to be either get an older RISC OS computer (but I don’t have anywhere to put it) or save up to buy a Titanium based one (which would certainly be very nice but simply don’t have the spare cash just now). Using an RS232 programmer might be a good option if I can get one up and running through USB to serial adapter (or possibly wire directly to the Pi GPIO) – would your toolchain support programming over RS232? Quite a few of the electronics tutorials I’ve been reading for PIC seem to think that building your own programmer is a good way to get started! |
Ian Karley (65) 30 posts |
As yet I have no direct support for any programmer although it will generate code that Sprow’s system and most other programmers can directly write. |