Sorry for the confusion. It is the first time I use gitorious, and I just uploaded my working tree there. I have the intention of getting my modifications piece by piece into the official dfu-util release, so I keep my master branch in sync with upstream and have my dfuse stuff in the dfuse branch. I realize now that when someone clones from gitorious they will be checked out in the master (upstream) branch. Use
git checkout dfuse
after cloning. I will add this information to the gitorious page
My dfuse code verifies the target addresses and will do everything to avoid overwriting the original boot loader. My experience is that the original dfu-util is not able to set target address, so the device itself applies the default target address which is the correct one and should also not overwrite any boot loader. So I think and hope that Rich’s bootloader has not been messed up.
I want to add a “–dry-run” option to the loader, so that target addresses can be verified before a real transfer. For now there is the possibility to make a dry-run build:
make clean; make CFLAGS="-g -O0 -DDEBUG_DRY"
I am glad you are testing it out on MacOSX. If the original dfu-util code (master branch) does not build out-of-the-box, we should try to get it fixed in the official dfu-util project as well.
Rich, (as I indeed have written in previous examples) you have to use the “–dfuse default” option. That would also catch any attempt to use the original code…
Which “echo” is this? My experience on MacOSX (Darwin 8.11.0) is that the built-in echo in bash does the same as on Linux, and same with the sh builtin. BTW sh is emulated by bash (same binary). /bin/echo ignores both backslashes and -e.
Well, all that I know is that -e is ignored when echo is called from the command line (running bash) but when run through the generation phase the -e is outputted to the dfu version header file.
You really mean ignored and not honored? If I try in bash: echo “a\nb\nb” it returns a\nb\nb, but with -e I get three lines. Can you please attach your src/Makefile? make will run each tabbed line in the Makefile with $SHELL, the question is what did configure set SHELL to. Which OS and bash version do you have?
SHELL was set to /bin/sh and when I changed that to /bin/bash everything compiled fine. Running in bash echo honours the -e -E parameters bun in sh it doesn’t. Running 10.6.
Finally I got home and could test the new binary on my Mac and… it failed
Opening USB Device 0x0000:0x0000...
Claiming USB DFU Runtime Interface...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
not at least 2 device changes found ?!?
Opening USB Device...
Found Runtime: [0x0483:0xdf11] devnum=3, cfg=0, intf=0, alt=0, name="@Internal Flash /0x08000000/12*001Ka,116*001Kg"
Claiming USB DFU Interface...
Cannot claim interface: Permission denied
Thought what the hell, tried again and… [size=150]SUCCESS![/size]
After a bit of testing I found that the first run after the DSO nano is connected fails but all following runs works just fine.
I tried running git checkout dfuse to switch the branch, but now I can’t compile. I get Undefined symbols:
“_dfuse_do_raw_dnload”, referenced from:
_main in main.o
“_dfuse_set_address_pointer”, referenced from:
_main in main.o
“_dfuse_do_upload”, referenced from:
_main in main.o
“_dfuse_do_dfuse_dnload”, referenced from:
_main in main.o
ld: symbol(s) not found
So git has foiled me again. me to send anything tell me where to send it.
From what I am hearing I maybe able to use the tarball to reprogram my device. (Hope the bootloader is still in place.)
I did not have time to find a machine that would run the dfu demo.
Using the binary I built from the tarball it is still claiming to download the full firmware, so I think the bootloader is still there. Can someone send me the full set of commands I need to use to download the firmware to get up again? The device says it is a DSO Nano v1.1
DS0201 Device Firmware Upgrade Ver 2.0
I have only tried downloading the lib and app, both the 2.1, 2.5, and 3 versions. One of the times I must have done it okay, but now I am not hitting on the right version to be functional again.
Had the same issue but the following solved it: make clean && ./autogen.sh && ./configure
Basically the file set have changed but the makefiles didn’t know about it.
Attaching my binary if you want to try it, built and tested under 10.6 only. dfu-util.zip (14.1 KB)
If you did not use the “–dfuse default” option you have in practice been using the original dfu-util software, just with some bug fixes added. This code does not send erase requests to the Nano, so nothing will be written. So I think your bootloader should be untouched. Since you have more than one DFU device connected you have to use the command line that I used, plus “-d vid:pid”.
Thanks for pointing me straight. I have recovered my device and can now compile the correct branch of firmware. I did not have the USB failure on the config, but I did have to manually edit the Makefile to use the right version of libusb. I do not know how hard it is to specify that on the configure command line.