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

SAM-BA Alternative


  • Please log in to reply
1 reply to this topic

#1 teachop

teachop

    Advanced Member

  • Members
  • PipPipPip
  • 44 posts

Posted 14 March 2011 - 09:53 AM

With kernel 2.6.37+, the SAM-BA tool can work smoothly again in Linux to re-flash Netduino, due to the inclusion of the sam-ba.ko driver. This driver can be built for earlier kernels - I am using it with Ubuntu 10.10 now.

An alternative to SAM-BA that is open source python code located here:
Sam_I_Am
This can work with the same sam-ba.ko driver.

In order to use it to burn the Netduino, add the following line to the device table in flash.py:
# AT91SAM7X512
  ('512K', '128K'): ("AT91SAM7X512", 64, 256),

To get the GPNVM boot bit re-set after erase/program, the flashif.py needs tweaked. Add something like this to flashif.c, rebuild it, and include the hex data in flashif.py. Call this in the Exit case (after programming).
static void doRemap(void)
{
  (void) waitForFRDY();
  *MC_FCR = 0x0b | (2 << 8) | 0x5A000000U;
  (void) waitForFRDY();
}

There is further to go, but that will get Netduino re-flash working. The python has a lot of other features that are set up for an at91sam7s, and I have not looked at them for at91sam7x at all.

My reason for using this is that for an interval, my linux machine is a powerpc Apple eMac, and the Atmel SAM-BA isn't available for powerpc or in source code form. I suppose there are not many experimenting on Netduino without a .NET, and even fewer on Linux. But, if you are tempted, it works and is fun.

#2 Corey Kosak

Corey Kosak

    Advanced Member

  • Members
  • PipPipPip
  • 276 posts
  • LocationHoboken, NJ

Posted 17 March 2011 - 01:09 AM

nice!




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.