Porting NuttX to Spark Core

Hi guy,

I know the original Spark Core firmware is fantastic, but I’m planning to port NuttX RTOS for it.

This is a POSIX RTOS very powerful with features similar to Linux. Case you also are interrested to jump on the wagon, please let me know. []'s Alan

4 Likes

Awesome, thanks @acassis - looking forward to seeing what you put together!

Hi @zach, I’m looking forward to start it. I’ll need to get OpenOCD working with SparkCore, but I think it is already supported, right?

It can definitely do OpenOCD, although we don’t have the process documented because we’ve been using an ST-Link. If you do get OpenOCD working though please post the process so others can use it!

I assume that if you want to use either OpenOCD+JTAG or ST-Link, you would need to use the JTAG shield? The JTAG shield looks like it just supports the connector and provides the correct pull-ups. Do I have that right?

Yes, that’s correct. You could also build your own “JTAG shield” with a few resistors and a JTAG port on a breadboard; the schematic is on our github site at http://www.github.com/sprk/shields

Hi Guys,

Seems I’ve been finished some of the work :stuck_out_tongue: @ acassis

I ported it on a little board called “leach”. It contains a single STM32F103CBT6 chip.
This board make use of dfu-util, ONLY usb is needed to debug and upload code, thus it is much easier while developing.
(ps: It uses maple mini bootloader which can be updated via uart - https ://github.com/leaflabs/maple-bootloader/tree/mini-boot)

Please refer to this link: https://github.com/librae8226/nuttx-git/tree/leach
To build it, first prepare the arm-none-eabi- toolchain, then in the nuttx source tree:

$ cd tools
$ ./configure.sh stm32-leach/usbnsh
$ cd -
$ make

“leach (mini)” is just a board name, it is originally derived from maple-mini (http ://leaflabs.com).
You can check it out at: https://github.com/LeafGrass/Maple-mini-r2-evolution-board

I would like to say, nuttx is REALLY COOL for *nix enthusiasts.

Some pictures of this board running nuttx below.

http://leafgrass.weebly.com/uploads/1/2/3/1/12314617/3120853_orig.jpg
http://leafgrass.weebly.com/uploads/1/2/3/1/12314617/258846_orig.jpg

Thanks,
Librae.

2 Likes

Hi @librae8226
Just 3 letters: WOW

Congratulations for your nice job!

Exactly!, for people with Unix/Linux background NuttX is the best RTOS ever made. It fits very well on low end microcontrollers; These microcontrollers cannot run Linux because there is not enough room (RAM/FLASH).

Could you please join NuttX yahoo groups and submit your patch?

Best Regards, Alan

1 Like

Up until @acassis’s post I didn’t know what NuttX was -_- Now that I do, this sounds like an awexome project.

BTW, you can program the Spark Core with a JTAG programmer directly in a super fast amount of time, maybe 1 - 4 seconds, depending on the size of the application. I’m sure USB will be an option as well, you don’t necessarily have to program it over Wifi.

Of course I am glad to submit patches for NuttX. Will try then.
Looking forward to your work here, can’t wait to enjoy the Spark Core with this RTOS.

Hi @BDub, I’m glad to bring NuttX to you knowledge.
I think the best way to program Spark Core initially will be JTAG for sure.

Currently I’m using OpenOCD in other projects (see in my blog: http://acassis.wordpress.com), then I suppose it will not be an issue. I suppose you also already uses OpenOCD right?

1 Like

@acassis I’m not at the firmware debugging state with Spark Core yet, but I have a STLINK/V2 and have been using their Windows utility to do some initial programming via JTAG. I’m currently installing Ubuntu 12.04 on a spare laptop to get DFU-UTIL working. I’m sure it won’t be long before I give OpenOCD a spin :wink:

Ok I am interested in jumping on the wagon. I used Nuttx on one of my last projects and would love! to use it again. Let me know where and how I can help.

I have asked Greg for a home the the SparkCore in the tree:

http://groups.yahoo.com/neo/groups/nuttx/conversations/topics/4346

Hi David,
welcome aboard. I think all pieces are put on the table: librae ported NuttX for a STM32F103C8 board (maple board from leaflabs) and I integrated CC3000 driver on NuttX. Now we just need the SparkCore to tie these pieces.

There still much work to fix some CC3000 BUGs, but I didn’t test using a new CC3000 firmware from TI, maybe some these BUGs were fixed.

I’m looking forward to get a SparkCore to test NuttX on it.

1 Like

Hi Alan,

Sorry I did not make the connection to “Alan” at the nuttx discussion at yahoo. Please forgive me for that.

Thank you for the CC3000 contribution to the nuttx tree!

I just ordered CC3000BOOST from the ti store and a maple mini from http://www.aliexpress.com/snapshot/273786734.html

I plan to mod the mini to the sparkCore V1. I guess it is a race if my SparkCore shows up before the maple does.

Hi David,
don’t worry about it.

Your idea to connect Maple Mini pins to CC3000BOOST is very clever, this way when Spark Core arrive (if it arrive later) then you will have already NuttX working on it.

I hope SparkCore arrive soon, it will be nice get the power of NuttX on it!

Hi Alan,

Have you asked to be a beta tester or for some early hardware? May be we should…

Hi David,
No, I didn’t :frowning: and I don’t know if it is too late.

Maybe @zach could tell me if there is space for a beta tester, but more focused on NuttX port.

Sorry guys, would love to help, but we don’t have any extra Cores to share!

No problem @zach! I suppose there is not more boards for beta tester.

I hope my SparkCore arrive soon to let me test it. []'s Alan