SAM-BA not responding with olimex sam7s256 - embedded

I am using an Olimex sam7s256 board. I tried to get it up and running in linux (Ubuntu). I was able to successfully install GCC and binutils. I installed SAM-BA for linux from the atmel site. I was able to get the USB port for connection as specified in the SAM-BA manual (.dev/ttyUSB0).
But when I try to use the GUI and 'connect' there is no response.
I though that there is a connection failure, so when I presses the reset button in the board, I get a message "Failed to initialize FLASH accesses".
No matter how long I wait before pressing the reset button, I am not getting any SAM-BA window as given by other tutorials as below
can any one one help me out in this?
I did the 'tst' jumper set, reconnect the board for 10 s, disconnect and 'tst' jumper reset, reconnect before opening SAM-BA.
Any help will be greatly appreciated.
I am stuck.
It is the same for both SAM-BA 2.9 and 2.8.

By this point you are already connected. If you specified the at91sam7256-ek even if you arent using that board it will not put this gui up if it didnt talk to the chip/board. I recently went through this exercise with an olimex sam7s-256 header board. (with ubuntu linux). If I didnt specify the board type then the window came up but it wasnt really connected.
Notice how the code at 0x00200000 is valid instructions (most start with a 0xE and the vector table starts with a bunch of 0xEAs which are branches out of the vector table) that is ram it didnt make those up it read that from somewhere. Load a binary file into ram in the 0x00200000 range and the refresh the memory (assuming your binary is different from what is there) and see it change.
When ready/comfortable you can erase the flash and see in the memory window that the flash (0x0010000 or something like that) changes to all 0xFFFFFFFFs. Now remember it wont boot when you do that. With the board I have there is a jumper you move then power the board to get the built in bootloader re-loaded into the flash so that you can use sam-ba again, I am sure there is a way to do that with your board but read the users guide first.
Please do not close this person out for asking about using a software tool. There are countless numbers of how do I use my iphone simulator or why is my android simulator slower than my iphone simulator questions that dont get touched. this question is as relevant as any of the programming questions about how to use gcc or some web thing or how to start up my phone simulator or java vm. I wouldnt want to have to start a campaign to close all of the gcc or iphone tagged questions because they are not programming questions.

I think my question was misunderstood. The GUI window which I have posted is NOT what I get. I just posted it to say that I am not getting such a window at all. That window pops up only when I select 'no board'. When I select SAM7S256-EK there is no response. No window opens. As given in your blog sam7stuff.blogspot.com, I downloaded SAM-BA. The onlydifference as u have posted and in the response also id that u are using a 'h' board.
Right now I am using a custom made SAMBA alternative from this website,
http://claymore.engineer.gvsu.edu/~steriana/Software/
It is also a python based boot loader. It is command line though.
I would love to use the SAM-BA GUI. I am sure that the board is OK and samba is communicating with the board b'cos if I select any other board type other than ARM7S256-EK option it is giving me 'communication failure'.
If you have any suggestions please do let me know. Also many thanks for backing me up. I had some real good insights from this forum about embedded field and I felt it is a good place to discuss embedded programming doubts and never thought of 'programming' or 'non-programming' b'cos for SAM-BA user guide itself talks a lot about customizing the SAM-BA for a custom made board involving TCL scripts but I couldnot get hold of the concepts. So I thought someone would have had the same problem and would have found a TCL or C 'programming' solutions in this forum.
Thank you.

Related

How to get icon for network computer ( smb/afp ) on macOS based on type

Is it possible to get icon for network computer/ip address under macOS so iMac has iMac icon etc?
I am using NSNetServiceBrowser to get available services, but I do not know how to get icon like official Finder app does. Finder recognize icons for iMac, MacBookPro etc. Thanks.
I don't have a working solution for you, but I see your question didn't get much attention yet so maybe I can point you in the right direction.
Finder looks for services, and it will check if found services have "device info" associated with them. This is done via Bonjour, looking for a _device-info._tcp pseudo service. A lookup for a device info may return a Bonjour TXT record that indicates the model ID of the gizmo. If Finder succeeds in getting this info, then it assigns an icon accordingly, otherwise, it picks a generic icon.
The icons themselves seem to be stored here: /System/Library/CoreServices/CoreTypes.bundle (at least on my 10.13 machine). Check the Info.plist on that bundle, and the other bundles contained within, and you can find mappings between device types and icons.
There are some posts talking about how to customise the icon that's shown for certain devices:
Add custom network device icons in Mac OS X Finder?
Can you use Bonjour for Windows to broadcast a different icon than the Bluescreen?
I tried to follow the steps in this post to examine the model names advertised by some Apple hardware on my network, but couldn't make it work (either using the dig tool or with NSNetService) (although I admit I didn't try very hard with NSNetService as I'm not familiar with it).
This thread discusses potential problems and solutions, however the dig tool wouldn't work for me despite having both SMB and AFP over TCP enabled.
All of these threads are fairly old, although the commentary in the linked SO post suggest this still works at least as of Sierra.
Good luck!

programming nRF51822 and integrating it on a PCB

I have a basic firmware question. I am looking to program a nRF51822 IC and integrate it on my own PCB. The evaluation kit seems to already have the IC soldered on it. Is it a way I can only program the nRF51822 and getting it ready to use elsewhere?
Get yourself one of these J-LINK LITE CortexM:
and hook up your connection header like this to your microcontroller (SWDIO, SWCLK, VCC and GND are the only ones needed):
.
Then, use Keil or nRFGo Studio to program your device.
You don't need J-Link at all. Any STLinkv2 board will work, like STM32 dev boards. But even nicer are these cheap Chinese programmers: http://www.aliexpress.com/item/FREE-SHIPPING-ST-Link-V2-stlink-mini-STM8STM32-STLINK-simulator-download-programming-With-Cover/32247200104.html
All you need to do is connect the Vcc, Ground, SDIO, and SWDCLK lines from your board/chip to the programmer, so make sure those pins are broken out and easy to get to.
There are some good instructions on how to do that here: https://github.com/RIOT-OS/RIOT/wiki/Board:-yunjia-nrf51822
I've built Linux workstations for workers on assembly lines to use with this method, and it just loops over and over for new boards. So they don't even need to touch the PC, they can just place a board on the jig or connect a header and it's all automatic.
You will need a programming device, such as a Segger Jlink. The eval kit has an on-board Segger programmer on it (that big chip with the Segger sticker on it).
I'm working through this process myself at the moment. I read somewhere that some people were successful at 'hacking' the eval kit, to bring the SWDIO and SWCLK over to their custom board but that really isn't the right way to go about it.
Instead, purchase an actual programmer and put a programming header on your custom circuit board.
While I am also still in the research phase here as well, it looks like there are 4-5 pins to connect from the programmer to your custom target board. The nRF documentation seems to be rather lacking in the definition of the programming setup, but look under the debugging category and take a look at Segger documentation as well.
If going into mass production there are ways to pre-program the chip before assembly, but I haven't had a chance to learn about that just yet.

What is the nature of the gestures needed in Windows 8?

Most of touchpads on laptops don't handle multitouch, hence are not able to send swipe gestures to the OS.
Would it be possible to send some gestures to Windows from an external device, like a Teensy, or a recent Arduino, that can already emulate a keyboard and a mouse. I could send buttons 4 and 5 (mouse wheel up and down), but I would like to send a real swipe gesture (for example with a flex sensor...).
One of the ways that you could work with arduino and similar is to use the Microsoft .NET Microframework, which is an open source code, available for no cost from: Micro Framework
There are other frameworks available for the Artuino that you might want to use. So if you have a great idea on how to utilize the sensor hardware, then the output must meet certain specifications.
To be able to connect to your hardware that reads gestures, you will need to understand how drivers are created, so take a look at this: Info on drivers.
To find that type of information you would need to take a look at above link, this is for sensors, which would appear to be not quite what you are looking for, you are looking to use "gestures" but first you have to be able to make the connection to your device, this guide MIGHT help. I have reviewed it for other reasons.
There is a bunch of stuff to dig through, but first of all, imo, is to understand how to get your software to communicate with Windows 8. Let me know if you have any other questions. I am not the best person, you might want to refer to the community at the Micro Framework link shown above.
Good luck.
That's perfectly possible. What your effectively suggesting is that you want to create your own input peripheral like a trackpad and use that to send inputs. As long as windows recognizes this device as an input source it will work.

ATtiny45, Arduino programming error?

I set up my Arduino and ATtiny45 the way the tutorial How-To: Shrinkify Your Arduino Projects showed. I wish to make an LED, hooked up to my breadboard, blink.
I'm running Windows XP, and I have the latest release of the Arduino IDE and have set up my programmer to be Arduino as ISP, as well as my board to be ATtiny45 (8 MHz internal clock).
The problem occurs when I try and upload the compiled code onto the board. The IDE returns this error:
avrdude: stk500_getsync(): not in sync: resp=0x00
I have searched for answers for a long time, but I found nothing. How do I fix it?
It means that your microcontroller is not detected. Things to check:
Wiring: are the pins used for chip programming correctly connected (no crossing?)
Power supply: Is the board properly powered?
PC configuration: Is the Arduino IDE using the correct port of the PC?
and from the Arduino help:
If you have an Arduino NG, did you press reset just before selecting
Upload menu item?
Is the correct serial port selected?
Is the correct driver installed?
Is the chip inserted into the Arduino properly?
If you built your own Arduino or have burned the bootloader on yourself: Does the chip have the correct bootloader on it?
Arduino is bootloader based. This means that the chip must have a little piece of software inside that is responsible for the communication with the Arduino IDE and the self programming of your application binary into the chip. This piece of software is called "bootloader". If your chip came empty ( sold separately or erased by mistake ), there is no bootloader inside.
There is no way to program a booloader into a chip without using an external programmer.
(Or another bootloader already inside. Some chips include a low level bootloader in the ROM...)
But, luckily for you, building a home made programmer for AtTiny is easy. Search google for "AtTyny ISP programmer".
And if you have questions about that, ask them at "Electrical Engineering StackExchange"
When you get a virgin ATTiny, you need to set the fuse bits on it. It does not require the Arduino bootloader, but the process is similar to burning the bootloader. This tutorial helped me get my ATTiny85 up and running, take note of the "Configuring the ATtiny to run at 8 MHz (for SoftwareSerial support)" section.
Also, I've noticed there are different 'board drivers': the items that appear in 'Tools > Board' in the Arduino IDE. You may be using a set that does not work, try this, this or have a google around to find more. Just be sure to go through the entire process when you try a new set (i.e. burn the bootloader, reboot, burn your code).
Good luck.
In my case i had the same issue with Duemilenove Arduino compatible board i bought
I found this fix.
Go to \hardware\arduino\boards.txt, find this line "uno.name=Arduino Uno uno.upload.protocol=arduino", replace the protocol=arduino to =stk500.
I don't know if it works on Uno, but it did save me from similar issue with Duemilanove.
I've had the same problem with getting attiny85 to work.
In my case, arduino micro was used to program it.
I digged into this problem and found that the recent version of arduino IDE(1.8.5) was slightly wrong with its configuration of utilizing the avrdude.
I'm assuming that you already tried burning bootloader but it fails with STK500 sync error.
How to fix:
Prepare a text editor program which is able to edit unix line ending files properly. eg) Vim, Emacs, Microsoft Visual Studio, notepad+, atom
Go to the arduino install directory. eg) C:\Program Files(x86)\Arduino
Open hardware\arduino\avr\programmers.txt with the editor you prepared. If it's under the program files directory, running text editor as administrator would be useful.
On line 44, you can find Arduino as ISP. Keep following those lines and edit these two lines like below.
arduinoasisp.protocol=arduino
arduinoasisp.program.protocol=arduino
Save and try burning bootloader again.
It must had stk500v1 as default. It basically should be the same but the recent version of avrdude(also included in arduino ide by default) has different workflow on them.
Another useful info: burning bootloader on attiny also does fuse work.

Programmable stand alone Button (hardware+software)

I need to have a physical button that when pressed will be noticed by my program.
There are many types of usb-buttons that are preprogrammed to open a website, shutdown the computer and so on. And I have seen some projects using buttons and serial port.
But none of them "have it all", an easy description of how to put togheter the hardware, and an easy description of the code.
I really only need a button connected to the serial port that send some signal that the button has been pressed.
I know this question is a crossover between software and hardware, but when I googled this I have seen plenty more people asking this question, all of them left without answers.
Maybe this question fits stackoverflow?
EDIT: My solution
My application in this case was a que system and I wanted a button for people to print a que ticket.
I just took apart an old ps2-mouse and bought me a button (4$) and solded two wires from the circuit board to the button. Each mouse button has to dots on the back of the circuit board that we can connect an external button to.
Then in my program I just hooked the mousebutton-event systemwide to get when the button is pressed, in my case this computer is dedicated to this program so its not a problem.
Might be worth a look at Phidgets:
http://www.phidgets.com/index.php
They do many little USB I/O devices, and the code samples are there on the site too.
I would take a look at the Arduino microcontroller board - you can wire all sorts of things into that (buttons, sensors) and interface with it using the .NET Ports classes.
I'm looking for the same thing. this might do the trick:
http://awatts.co.uk/
Haven't tried it yet, but he has code to run a shell command or simulate a keypress and the source code is available if you need something different.
And for Linux: search freshmeat dot net for usb-panic-button-daemon project. (I'm a new user, and can't post more than one hyperlink!)
And another thing I just found is that Griffin makes an SDK available (at least they used to, I'm waiting for a reply) for their PowerMate knob to get it to simulate more than mostly just keypresses.
BTW I'm looking for USB buttons, but I could use serial too, come to think of it.