Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

FreeRTOS


  • Please log in to reply
45 replies to this topic

#1 teachop

teachop

    Advanced Member

  • Members
  • PipPipPip
  • 44 posts

Posted 23 January 2011 - 02:35 PM

For entertainment, I tried FreeRTOS on the Netduino Plus using SAM-BA. The networking has flakes, but it is working. With the SAM7X demo, it acts like a USB mouse OK, prints stats via the web server, and gives control of the LED to a web page. It is easy to get the real Netduino Plus software back into it when you are done. Anybody else playing about with this, or something similar?

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 23 January 2011 - 06:36 PM

Hi teachop, That's awesome. Are you thinking of building anything else with FreeRTOS? Also, curious: is FreeRTOS using lwIP or uIP? There's a group of programmers over in Japan who have been hacking away at the Netduinos using FreeRTOS/native code projects. We designed the Netduino line to be highly compatible with Atmel's SAM7X code samples so that you could write complete native projects (with 512KB code space and 128KB RAM) if you're into that sort of thing. Chris

#3 teachop

teachop

    Advanced Member

  • Members
  • PipPipPip
  • 44 posts

Posted 23 January 2011 - 07:14 PM

Are you thinking of building anything else with FreeRTOS?

You asked, no laughing. Two current projects might fit: One is a midi solenoid-over-wind pipe organ (currently arduino), second is a physical email/gmail/snail notifier wall hanging. The second is what I bought the board for...

is FreeRTOS using lwIP or uIP?

The demo I built is uip. A few edits of the web server got it running, have not touched the stack.

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 23 January 2011 - 08:25 PM

Ooh, I'd love to see both those projects. Nice! The demo you built on uIP...is the networking solid now or still flaky? We've been looking at ways to get uIP up and running on the Netduino Plus. Chris

#5 Illishar

Illishar

    Advanced Member

  • Members
  • PipPipPip
  • 146 posts

Posted 24 January 2011 - 09:37 AM

Heh, I was actually planning on writing a post just like this :P Haven't got around to compile it yet though. I was planning on taking a look at the lwIP demo: http://www.freertos....tsam7xlwIP.html

#6 Illishar

Illishar

    Advanced Member

  • Members
  • PipPipPip
  • 146 posts

Posted 24 January 2011 - 09:46 AM

Personally I plan on playing with FreeRTOS and the atmel driver package: http://www.atmel.com...sp?tool_id=3759 It'd be interesting to see how many of the samples I could make work. I'm also considering whether I should buy the AT91SAM7X-EK or not. This is the sample list: Project Description =================================================================================================================== basic-adc-project Voltage acquisition demonstration basic-can-project Demonstrates usage of the Controller Area Network (CAN) peripheral. basic-dataflash-project Performs erase, read and write operations on the dataflash connected to the evaluation kit. basic-dhrystone-project Computes the number of dhrystone per seconds that the chip can generate under different configurations. basic-emac-lwip-project Webserver example using the lwIP library. basic-emac-project Enables the device to respond to ICMP ECHO requests sent on the network. basic-emac-uip-helloworld-project Webserver and telnet examples using the UIP library. basic-emac-uip-telnetd-project Webserver and telnet examples using the UIP library. basic-emac-uip-webserver-project Webserver and telnet examples using the UIP library. basic-internalflash-project Demonstrates the features of the Embedded Flash Controller (EFC/EEFC). basic-iso7816-project Sends ISO 7816 commands to a smartcard connected to the evaluation kits. basic-microcanopen-project Demo based on Open Source of the Controller Area Network (CAN) peripheral: Microcanopen basic-pwm-project Makes one or more LEDs glow using a PWM signal. basic-rtt-project Demonstrates basic usage of the Real-Time Timer (RTT) peripheral. basic-sd-spi-project Performs read and write tests on a SD card connected to the evaluation board through SPI. basic-serialflash-project Performs erase, read and write operations on an external Serial Firmware Dataflash chip connected to the board. basic-twi-eeprom-project Reads and writes an external TWI serial EEPROM. basic-usart-hw-handshaking-project Regulates the speed of a USART file transfer using RTS/CTS hardware handshaking. getting-started-project Details basic operations with AT91SAM device usb-device-ccid-project This example implements a CCID driver. usb-device-cdc-serial-project This software acts as a bridge between a USB and USART connections. A virtual COM port is created on the host computer, enabling simple communication over the USB. usb-device-composite-cdchid-project This example shows a composite with CDC serial and HID keyboard integrated. usb-device-composite-cdcmsd-project This example shows a composite with CDC serial and Mass storage integrated. usb-device-composite-hidmsd-project This example shows a composite with HID keyboard and Mass storage integrated. usb-device-core-project This example shows a basic USB application which only performs the enumeration step, so the host computer detects a new USB device. usb-device-hid-keyboard-project Creates an USB keyboard using the evaluation kit, enabling the user to type in characters and special keys (such as shift or num. lock) by pushing buttons. usb-device-hid-mouse-project Creates an USB mouse using the evaluation kit, enabling the user to move cursor with Joystick. usb-device-hid-transfer-project Creates an HID compatible device using the evaluation kit, enabling the user to do customized transfers via some PC program. usb-device-massstorage-project Creates USB Mass Storage drives using internal and external memories of the evaluation kit. =================================================================================================================== Juicy right?

#7 Illishar

Illishar

    Advanced Member

  • Members
  • PipPipPip
  • 146 posts

Posted 24 January 2011 - 09:47 AM

What compiler are you using teacop? Codesourcery? Which version?

#8 Illishar

Illishar

    Advanced Member

  • Members
  • PipPipPip
  • 146 posts

Posted 24 January 2011 - 09:50 AM

Chris, maybe you should create new main thread for FreeRTOS? We could post some tutorials, tested samples etc. in there.

#9 Illishar

Illishar

    Advanced Member

  • Members
  • PipPipPip
  • 146 posts

Posted 24 January 2011 - 10:45 AM

Did you know btw, that FreeRTOS also come in a SIL3 approved version? SafeRTOS. Functional safety. IEC61508. Very important stuff. Very interesting. I wonder what TÜV SÜD would think of the Netduino hw ...

#10 teachop

teachop

    Advanced Member

  • Members
  • PipPipPip
  • 44 posts

Posted 24 January 2011 - 10:51 AM

What compiler are you using teacop? Codesourcery? Which version?

Yes, CodeSourcery lite. Used eclipse for the environment, but no debugging. Figured out a pattern so that SAM-BA works every time, at first it was a pain. I had to make some changes in the web server because it was crashing, other than that it was just stuff like LED defines, and it worked.

#11 teachop

teachop

    Advanced Member

  • Members
  • PipPipPip
  • 44 posts

Posted 24 January 2011 - 10:57 AM

The demo you built on uIP...is the networking solid now or still flaky? We've been looking at ways to get uIP up and running on the Netduino Plus.

Chris

It is stable enough, in the short time I have had it running, once it is going, it doesn't hang up. There are dropped IP packets but I don't know if that is a problem or not yet. The flakes are in the connect/disconnect ethernet. I have to 1) power the Netduino Plus, 2) connect the ethernet. If the ethernet is connected already, then it sometimes isn't working, so I need to investigate that.

#12 billy

billy

    Member

  • Members
  • PipPip
  • 23 posts

Posted 24 January 2011 - 04:40 PM

I got Netduino plus running with FreeRTOS 6.1.0+lwip 1.1.0, in FreeRTOSV6.1.1\Demo\lwIP_Demo_Rowley_ARM7 folder. It is compiled with GCC-4.1 toolchain from www.gnuarm.com (http://www.gnuarm.com/files.html) With the following changes: . Need comment out the LED task as we only have one LED on PB23. . Need change the #define of LED3 to PB23 . Need change the error check task to use LED number 2.(By doing this and the step above, we can have error checking task or LED blinking task working) . USB-CDC is a task in the Demo, it simulates USB to PC connection as a virtual COM port, this can be used as debugging console. The Windows INF file(driver) is in the USB folder of the Demo, well, if you need debug lwip, especially if you want to dump debug info in the initialization stage, you need delay load lwIP. . If the newlib in your toolchain was built without arch dependent, you will need a file syscalls.c, find it in the uIP folder for AT91SAM7X and put it in the build root. I also tested with YAGARTO version 20100703, same code, not working. CPU hangs once network cable plugged. Sames it is a compiler issue, something wrong in the EMACIsr, maybe? PS: you will also need to change the IP address, Mac address and default gateway address in EMAC\SAM7_EMAC.h http://www.freertos....tsam7xlwIP.html

#13 Casper

Casper

    New Member

  • Members
  • Pip
  • 6 posts

Posted 24 January 2011 - 08:22 PM

I'm very interested in using C/C++ with the Netduino Plus. To start with I would like to blink the onboard LED, but I don't have any clue where to start. I've experience with AVR but ARM is new to me. Which compiler do you recommend? SAM-BA asks for a COM port on startup, is it possible to use USB instead?

#14 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 24 January 2011 - 10:36 PM

Hi Casper, You can use SAM-BA v2.09 via USB (although it works best on XP or Vista 32-bit). As far as blinking via C/C++, grab the SAM7X software demos from the Atmel website. I can track down the link if you need it... Chris

#15 Illishar

Illishar

    Advanced Member

  • Members
  • PipPipPip
  • 146 posts

Posted 25 January 2011 - 08:09 AM

Actually I've already posted the link in this thread. But I can post it again: http://www.atmel.com...sp?tool_id=3759

#16 Illishar

Illishar

    Advanced Member

  • Members
  • PipPipPip
  • 146 posts

Posted 25 January 2011 - 08:11 AM

If you wait a few days Casper, I'll post a Blinking sample for you. (I was going to do so anyway.) If I can make it work ...

#17 teachop

teachop

    Advanced Member

  • Members
  • PipPipPip
  • 44 posts

Posted 25 January 2011 - 09:16 AM

I got Netduino plus running with FreeRTOS 6.1.0+lwip 1.1.0, compiled with GCC-4.1 toolchain from www.gnuarm.com
with few changes.

I also tested with YAGARTO version 20100703, same code, not working. cpu hangs once network cable plugged.

Nice. Was very interested in your compiler experiences. I used CodeSourcery lite GCC, and have not tried the others. In the demo I built, there is a look-up function in the cgi code that crashes, and I had to rewrite it. I suspect that is a compiler issue as well. Other than that it was just, like you experienced, configuration details.

All in all, FreeRTOS+CodeSourcery+eclipse on Netduino Plus is looking pretty good, and I suppose I can live with SAM-BA! It seems my first Netduino Plus project will be without a .net. This will give performance and easy access to the irqs. You can't beat the hardware feature set for the price (wish there was a JTAG though).

I have not tried to get the SD card going with FAT file system yet on FreeRTOS, have you worked on that at all?

#18 Casper

Casper

    New Member

  • Members
  • Pip
  • 6 posts

Posted 25 January 2011 - 02:04 PM

If you wait a few days Casper, I'll post a Blinking sample for you. (I was going to do so anyway.)

If I can make it work ...


Thanks Illishar, that would help a lot! I've managed to erase the Netduino and connecting it with SAM-BA. I'm trying to compile some basic code with Sourcery G++ Lite but without result yet. Does Sourcery G++ create a bin file which can be deployed with SAM-BA?

#19 Quiche31

Quiche31

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationFrance

Posted 25 January 2011 - 02:29 PM

I got Netduino plus running with FreeRTOS 6.1.0+lwip 1.1.0, compiled with GCC-4.1 toolchain from www.gnuarm.com
with few changes.
.....
http://www.freertos....tsam7xlwIP.html

Ottawa, could please fix the URL above?

Thanks!

#20 billy

billy

    Member

  • Members
  • PipPip
  • 23 posts

Posted 25 January 2011 - 03:29 PM

URL has been fixed. I also updated my post with more details. With the respect that Netduino is a .Net system and the great effort from the team, running FreeRTOS would be just testing, for me. My impression is that SAM-BA is still not very convenient. It would be nice if we could have TinyBoot like USB bootloader to work with. Ok, I tested CodeSourcery, when OPTIM set to -O2 in makefile, the demo started to work, with output bin size at around 82k. I guess YAGARTO will work if I do the same. one thing I don't understand is that the CPU_CLOCK_HZ is defined as 47923200 in FreeRTOS, vs. defined as 48000000 in Netduino firmware, why? Suggestion for forum moderator, maybe we can have an area for 3rd party firmware and other implementations? Thanks.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.