Forums » Software development »
Towards an offline compiler
Added by jaap over 12 years ago
Some notes on what I'm working on right now :-)
One of the problems we face at the moment is that we are stuck with the online compiler on http://www.mbed.org for our firmware. This results in several problems:- it's hard to share code and do proper versioning. MBED.org does not support sharing development environments on multiple accounts (their beta does now)
- we depend on libraries which are available only as binary.
- if mbed.org stops working for some reason, we're doomed (and working on the firmware without internet is impossible).
- getting a RTOS to work is very difficult (due to binary libs). Without RTOS, several other problems arise, so now is probably the best time to implement the RTOS.
The obvious solution is to try to find an alternative environment in which we can develop the firmware. We do like the MBED hardware, but the LPCxpresso could be a cheaper and compatible alternative. In later version, the LPC processor might be on our own board.
Anton Smeenk (spoorloos12 on github) did some research into the possibilities of implementing scmRTOS on the MBED. One of the difficulties is getting the network stack to work. It seems he already got it (more or less) working.
For those who want to explore scmRTOS on mbed, here's a quick start:
- Download https://github.com/spoorloos12/scmRTOS_CortexM3.git
- Download https://github.com/adamgreen/gcc4mbed.git
- Read README.md in the scmRTOS repository for installation instructions
Replies (36)
RE: Towards an offline compiler - Added by Anonymous about 12 years ago
Btw: in the software/lua/ folder you can find some test files.
Ok, pretend I know nothing about how your system works from the PC side of things and then you will be pretty darn close to the truth :) When I look at https://github.com/LaosLaser/Software/tree/master/lua I see 5 lua files and none of the lgc files you mentioned before. Am I to run the lua programs to generate some test files that I can then TFTP up to the device?
RE: Towards an offline compiler - Added by peter about 12 years ago
Yes. Run the lua file motiontest and capture the stdout.
If you have a config file with the flag "sys.nodisplay 1" then you should
Be able to see pulse direction signals on the stepper output.
Now that I think of it, you also need to set "sys.autohome 0" otherwise the
Network will not initialize.
Hook up a serial console to your mbed and capture the output to see what is
Going on.
I do not have a pc at hand at the moment (typing this fron my phone).
Otherwise I could do some testing. Dou you have your version of our
code in github or somewhere else.
RE: Towards an offline compiler - Added by Anonymous about 12 years ago
Thanks! I will give that a shot later today.
My version of the code is currently sitting in a cloned repository on my laptop. I would like to test it and see the networking code up and running before throwing it over the wall.
RE: Towards an offline compiler - Added by markp about 12 years ago
I'm not trying to make it work with gcc4mbed. I use the default gcc arm compiler.
The only thing I was not yet able to do was compile the networking code, due to the lack of the library.
Is there any work needed to get NetServices to work?
RE: Towards an offline compiler - Added by Anonymous about 12 years ago
The networking and SD file system code appear to work on my mbed and that is the code I had to fiddle with the most to get it to play well with gcc. However since I don't have an actual laser, the system as a whole might not be working.
RE: Towards an offline compiler - Added by peter about 12 years ago
He adam: If you compiled this binary 28-9-2012, 15:53 with your offline compiler: it works like a charm!
Can you post the code (on github?)
RE: Towards an offline compiler - Added by Anonymous about 12 years ago
Excellent.
My repository can be found here: https://github.com/adamgreen/Firmware
If you want to run GDB against this project, you can refer to this link: https://github.com/adamgreen/mri/blob/master/notes/mri-getting-started.creole#installation It discusses how to create a debug monitor enabled build when using GCC4MBED, connect GDB, and use it to debug the binary running on the mbed device.
Hope that helps,
Adam
RE: Towards an offline compiler - Added by hugomeiland almost 12 years ago
to learn a little bit about what you are doing; i just grabbed the git's form both gcc4mbed and the firmware, after the make clean all I got a huge list of warnings, ending with:
Compiling ../../gcc4mbed/src/gcc4mbed.c
Linking laos.elf
Extracting laos.hex
Extracting laos.bin
Extracting disassembly to LPC176x/laos.disasm
text data bss dec hex filename
127376 320 22680 150376 24b68 laos.elf
bash-3.2$
I'll try to put the bin file on the laser tonight...
Hugo
RE: Towards an offline compiler - Added by emilmont almost 12 years ago
News: the mbed SDK is now Open Source!
http://mbed.org/blog/entry/mbed-SDK-is-now-Open-Source
https://github.com/mbedmicro/mbed
Cheers,
Emilio
RE: Towards an offline compiler - Added by hugomeiland almost 12 years ago
as mentioned 2 days ago, i compiled a bin with the sources from github of the firmware and gcc4mbed; just tried the resulting bin in the laser, and it works great....
it looks like it becomes time to change the boot-up message of the compile time to the latest commit hash...
- « Previous
- 1
- 2
- Next »