avrdude xmega256a3 can't program usersig? - embedded

I use avrdude on osx to do development for an xmega256a3. It's wonderful, it lets me flash my target just fine. However, when I try to use it to program the usersig block, it doesn't work so well. I was initially excited by some early success with it, but found subsequent flashes weren't working.
Through testing, I determined that if my usersig file was for all 0's, it worked fine. But all FF's didn't work. Given what little I know about flash, these leads me to believe that I'm either missing an option or avrdude isn't doing a complete job for what it needs to do here.
The command I'm using is
avrdude -p atxmega256a3 -P usb -c avrispmkii -e -U usersig:w:mySig.hex
Using AVR Studio 4 on a Windows box, I am able to program any of these files to the usersig flash block.
My question boils down to is this possible? if so what option/incantation am I missing? Or am I out of luck for programming usersig for this processor with avrdude?
(I'm using version 5.11.1 from the CrossPack guys)

It turns out that old versions of avrdude indeed did not support this. It requires a page erase of usersig, and that was not supported until version 6, which is due out soon. I've tested with svn builds of it, and with a two line patch submitted to day, it does the job.

Related

Libuse for communication through C232HM

I have a problem with communication with Atmega644P. I am using C232HM Cable and avrdude. Unfortunately, every attempt of communication ends with the following comment from the command prompt: avrdude: Error: no libftdi or libusb support. Install libftdi1/libusb-1.0 or libftdi/libusb and run configure/make again. I installed following driver from Zadig 2.5: WinUSB (v6.1.7600.16385) and the error still occurs. What should I do?
To get past that error message, you have to do what it says: install the library that AVRDUDE needs and then build AVRDUDE from source in a way that it detects the library and uses it. But I am not sure exactly what you are trying to do and I cannot be sure that this will ultimately work for you. If you haven't built code from sourt before, it can be a challenge.
You never said how you installed AVRDUDE, but you might try downloading a binary version from a different place before you attempt to compile it yourself. The Arduino IDE comes with a version of AVRDUDE, and there is also an AVRDUDE package in MSYS2 (which I contributed).

Problems with Octave on Windows 8: crashes after any error

I have installed (and re-installed) Octave 3 times on Windows 8, and I still can't get it right. The first and most obvious problem is that the prompt is missing; the screen only shows the flashing underscore that follows the prompt. This is not a major problem since the system properly responds to commands.
The major problem is that Octave crashes whenever it encounters a syntax error, instead of politely giving a diagnostic. This makes for extremely tedious software development.
Is there a way around this problem, or do we just have to wait for one side or the other to come up with an accommodation?
I encountered the same problem. I solved it by this:
create a shortcut to octave.exe, then right click->property-> change the "target" to something like:
C:\Program Files\Octave\Octave3.6.*_gcc*.*.*\bin\octave.exe -i --line-editing
Then it won't exit if u have syntax errors.
I don't understand the meaning of the parameters yet.
reference:
http://exciton.eo.yzu.edu.tw/~lab/?p=1121
Type octave --help can check the meaning of parameters.
-i also --interactvie, to force Octave interactive behavior.
Maybe Octave run at non-interactive mode at default, that means prompt should not be shown and it should terminate immediately when encountered error when reading a file.
I don't know if this will solve your problem, or if this is too bloated of a solution for you, but I use Octave on Windows 7 through Cygwin without any problems.
If you can't get Octave to run on Windows 8, you may consider running Octave through Linux via computer virtualization technology (virtual computer). Two, off the top of my head that you could use are VirtualBox by Oracle or VMWare Player
Once you have it installed, you can go to any number of sites that have pre-built Linux images that you can download and then run inside of Windows 8.X. Do a Google search of for 'Virtualbox images' or as 'VMWare appliances'. You can then download and use that to run the lastest version of Octave. I hope that helps.
Cheers,

Raspberry Pi shutdown destroys file system

I trying to write a small c program witch reads out an GPIO pin to shutdown the pi externally. The triggering of the signal is working well. The program is started by LXDE as autostart application. If the program detects the shutdown signal it's performing:
sync();
system("halt");
Why does this program damage my ext4 file system after a couple of reboots. There is no fixed number of reboots necessary to damage the system. I don't see any difference by writing halt to command line. I'm using the newest version of the firmware(last update today) and also the kernel is up to date(last update today).
Does anybody have an good idea about it?
This app is a good idea, i wonder nothing like this is already existing...
I think the problem is the "halt" command.
You shuold use the explicit command "shutdown -h now" instead.
For further reading see Anthony Lawrence

IntelliJ - Running Program as Sudo

Developing a program on OSX using Java and IntelliJ. Deals with network sockets and ICMP. Hence, the program needs to be run as root or sudo'd on OSX. Program runs fine from a terminal window outside IntelliJ under sudo. However, I would like to debug and run it from IntelliJ (V9). In IntelliJ it errors (I need root privs to enumerate network devices). I know how to pass program and VM parameters in IntelliJ but now how to hit Run and/Debug and have it run under sudo? What is needed is basically sudo java ...... MyProgram instead of java ..... MyProgram Any ideas or workarounds.
I came out with an answer and wanted to share it just in case anyone else runs into this. To solve the problem, I took my cue from what I do with QT & QT Creator when doing network programming.
On OSX, I opened up a terminal window and cd'd down to/Applications/IntelliJ IDEA 9.0.3.app/Contents/MacOS. There you will find a file called idea which launches the IDE. I ran that as sudo (sudo ./idea). That took care of permissions on anything Intellij launched and I could debug and step through my code as needed.
sudo /Applications/IntelliJ IDEA 9.0.3.app/Contents/MacOS/idea
Since this is a dev machine and I am in control of it security is not an issue in this case.
Hope it helps someone else out.
Inside a terminal:
sudo -s
give access to the root user.
from there you could run the Idea IDE using the script:
/Applications/IntelliJ\ IDEA*/bin/idea.sh
and in this way I'm able to work on network where permission errors where printed before.
Debugging of sudo programs is disallowed by the operating system unless the debugger is running as root, for security reasons.
So, even if you can figure out how to get IntelliJ to use sudo it won't do you any good.
I know this is not what OP directly asked -
In case someone needs to do this on Linux (Ubuntu), e.g. in order to update Idea, just run from command line:
sudo /usr/local/bin/idea
Only make sure once the Update and Restart is finished to actually close Idea and start it normally
I agree with #Darron, it is not recommended to execute IntelliJ with sudo.
You can execute with IntelliJ terminal instead.
I maintain my project in IntelliJ. When I need to execute a unit test that requires sudo access, I just open IntelliJ terminal and type:
sudo gradle test
Good luck!

Is there anyway to compile mac binaries from a windows machine?

Seems like there wouldn't be, but it would help us out if there was. I wish to pull the source down to a windows server and compile it and have it be the same as if I had pulled the source code down to a mac machine and used xcode on it. Any Ideas?
Reasons: Release Engineering and IT are much more familiar and comfortable on windows, so it would be easier on us, and LaunchD sucks.
Your original question had less detail... I think you are creating more problems than you are solving buy not using a Mac. Is it really that hard to learn to compile under Xcode or type make in the console?
Anyway...
Apple uses a modified version of the GCC C/C++/Objective C compiler with a proprietary runtime library... You could develop using a port of this code to Windows. See GNUStep.Org. This is not binary compatible though but it isn't impossible that you could rebuild it to cross compile to something that was Mac OS X compatible.
Another idea would be to develop using c# .NET and then move the binaries across to Mac OS X and run the binaries using Mono....
None of these options are robust enough to allow you to do this blind without a Macintosh to test and get up and running in the first place.
You can compile cross app with Cocotron but only on Mac
Why do you need launchd? cron works just as well on Mac as it does on Linux, just have a cronjob that does (Extremely simplified version ahead):
cd /my/source/dir
git pull # You are using Git, right?
xcodebuild MyCoolProject.xcodeproj
cp -r build/MyApp.app /the/distribution/folder