Building firmware on Ubuntu on 13.10/Saucy: armel or armhf?

The PPA appears not to include an appropriate build for Ubuntu 13.10, however 3 potentially relevant packages are already part of the archive:

  • gcc-arm-linux-androideabi - cross toolchain and binutils for Android/Bionic on ARM
  • gcc-arm-linux-gnueabi - The GNU C compiler for armel architecture
  • gcc-arm-linux-gnueabihf - The GNU C compiler for armhf architecture

Are any of these appropriate for rebuilding the Spark Core firmware?

My intention is to incorporate pulseIn() so I can use an existing sketch for a Shinyei dust sensor. Alternative approaches welcome, in particular any that don’t require rebuilding the firmware.

HI @rolandturner

@timb has a beta version of pulseIn() working that you can find in this thread:

Since this was created, the Spark cloud connection has been modified to take advantage of any delay() calls that you have. I don’t think this version of pulseIn() takes that into account yet.

The Web IDE will give you the option of purely focusing on user code and the cloud handling the compiling of all the dependencies :slight_smile:

Thanks @bko, that’s exactly the piece of code that I have in mind, it’s same URL as appears in the comment to which you replied.

How is delay() relevant though? It’s only possible for one of delay() or pulseIn() to be running at a time, no?

How does the Web IDE (I assume this?) help? It appears to be about wiring code, no mention is made anywhere of building custom firmware.

you mentioned

so i recommended the Spark IDE :smile:

I mean it will be good to just focus on the user code (sketch) and test things fast instead of thinking about compiling locally

I’m sorry if I’m being thick, but I really don’t understand what you’re suggesting. How do I use the Web IDE to deliver timb’s pulseIn() code to the device?

The Web IDE is like the Arduino software.

So you can simply copy the pulseIn() code and paste in the Web IDE. The Web IDE also allows the creation of .h and .cpp files for users with more libraries to manage :wink:

Sorry I missed that you had already seen Tim’s code. Delay is relevant in that a more cloud-friendly implementation of pulseIn() would use interrupts and not block the cloud connection.

The “build” button you linked to is the web-based IDE where you can compile and download to your core over-the-air. You can cut-and-paste Tim’s code into your program their and be done in minutes.

Are you looking for instructions on doing a local build even though you don’t need to? Those are here:

I am finding the need to deal with a Web IDE uncomfortable so would like to avoid it where possible, but am happy to make use of it to get over the current hump. It wasn’t until Kenneth’s message above that I realised that C++ and wiring code could be mixed in the source file so, setting aside that I don’t wish to include Spark Cloud in the first place, yes, this looks workable.

My initial question was about the instructions that you refer to; they just say GCC for ARM, they don’t specify which architecture (armel or armhf).

@rolandturner, so if you need to get going, i can do the unclaim process and claim it to another account of mine and you can start coding :smiley:

Ah, using the Web IDE makes that unavoidable. OK, yes, please go ahead and unclaim.

All done :D. If you need help over the weekend do let me know

The next piece of awesomeness is clearly outside of Spark’s control, but I didn’t know about it until just now. After failing to connect to WiFi using the app, I switched to USB and:

** Even though the CC3000 supposedly supports WEP,
** we at Spark have never seen it work.
** If you control the network, we recommend changing it to WPA2.

I can now add yet another WEP network where it doesn’t work :frowning: I have another router lying around but it’ll have to wait until morning.

Opps… I used WPA here at home.

cmon just switch it to WPA or just try WEP. The core i passed you has the latest firmware. :smiley:

Hi @rolandturner,
Check this out:

I had the same issue with Ubuntu 13.10, I had to install it from 13.03 repo, here is how I did it:
sudo sh -c "echo ‘deb raring main’ >/etc/apt/sources.list.d/terry_guo-gcc-arm-embedded-saucy.list"
sudo sh -c "echo ‘# deb-src raring main’ >>/etc/apt/sources.list.d/terry_guo-gcc-arm-embedded-saucy.list"
sudo apt-get update
sudo apt-get -y --force-yes install gcc-arm-none-eabi

Hope this helps.

1 Like