rfunderburk

ZAP programming on MacOSX

Recommended Posts

Hello,

 

I have compiled ZAP for MacOSX and everything works but the actual program loading.  Here is the exchange between the zpuinoprogrammer and the ZPUino on Papilio Pro (LX9), Vanilla Variant:

 

 

---------------------------------------------------------------------------------------------------------
 
./zpuinoprogrammer -s 1000000 -R -vvv -d /dev/cu.usbserial-00002006B -b PhaseMeasure.cpp.bin 
Opened device '/dev/cu.usbserial-00002006B'
Connecting...
[1375704106.986641] Tx: 0x7e 0x01 0x1e 0x0e 0x7e
[1375704107.000600] Rx: 0x7e 0x81 0x01 0x09 0x06 0x00 0x00 0x7f 0xef 0x80 0x05 0xb8 0xd8 0x00 0xa4 0x04 0x17 0x00 0x9b 0x1c 0x7e
Got packet size 17
Got programmer version 1.9
SPI offset: 393216
CODE size: 8384384
Board: Unknown board @ 96000000 Hz (0xa4041700)
[1375704107.000784] Tx: 0x7e 0x02 0x2c 0x95 0x7e
[1375704107.016462] Rx: 0x7e 0x82 0xc2 0x20 0x17 0x00 0x75 0x58 0x7e
Got packet size 5
SPI flash information: 0xc2 0x20 0x17, status 0x00
Detected MX25L6445E flash
Will program sector 6 (page 1536), original offset 0x00060000
Need to program 6128 6144 bytes (24 pages)
Reading data, 6124 bytes
Computing sketch CRC (6124)
Final CRC: 5545
Settting baudrate divider to 5
[1375704107.016817] Tx: 0x7e 0x08 0x00 0x00 0x00 0x05 0x3d 0x05 0x7e
[1375704107.032527] Rx: 0x7e 0x88 0x07 0xc7 0x7e
Got packet size 1
Connecting at new speed (1000000)...
[1375704107.032590] Tx: 0x7e 0x01 0x1e 0x0e 0x7e
[1375704107.233661] Tx: 0x7e 0x01 0x1e 0x0e 0x7e
[1375704107.434793] Tx: 0x7e 0x01 0x1e 0x0e 0x7e
 
  ... Above repeated 29 times ...
 
Entering program mode
[1375704125.135058] Tx: 0x7e 0x05 0x58 0x2a 0x7e
[1375704126.137024] Tx: 0x7e 0x05 0x58 0x2a 0x7e
[1375704127.138137] Tx: 0x7e 0x05 0x58 0x2a 0x7e
Cannot enter program mode
 
---------------------------------------------------------------------------------------------------------
 
The programmer works fine for this board when running the Windows version.
 
Any thoughts?

Thanks,
Richard

Share this post


Link to post
Share on other sites

Well, partially works; gets a programming error and creates a brick. :)

 

I am able to run with a VM running WinXP on this mac and it works fine.  I also was able to load with the version before 'Zap', but I updated my serial drivers when first had trouble with 'Zap' so don't know the state of that right now.

 

I will try updating the drivers for the serial ports.

Share this post


Link to post
Share on other sites

Do you have a log output for that ?

 

Note: you might be using the sources/bins from zpuinoprogrammer that have problems with the MX flash.

 

Did you build it yourself or use a prebuilt programmer ?

Share this post


Link to post
Share on other sites

ok, so you did not build the programmer yourself.

 

The Mac version there is a bit old, and I don't have a Mac to rebuild the binary. You think you can try compiling the programmer yourself ? It's in the HDL repository, under "zpuino/programmer"

Share this post


Link to post
Share on other sites

Put together an autoconf.sh, added a "sysconf.h" (doesn't exist), modified "programmer.h" (add missing prototype), added a makeargv.c (doesn't exist in source) and I could then compile the code.  Unfortunately it gets a segmentation fault:

 

 

./zpuinoprogrammer -s 1000000 -vvv -R -d /dev/cu.usbserial-00001004B -b PhaseMeasure.cpp.bin 
Opened device '/dev/cu.usbserial-00001004B'
Connecting...
[1376062965.016544] Tx: 0x7e 0x01 0x1e 0x0e 0x7e
[1376062965.016613] Rx: 0x43
[1376062965.030355] Rx: 0x7e 0x81 0x01 0x09 0x06 0x00 0x00 0x7f 0xef 0x80 0x05 0xb8 0xd8 0x00 0xa4 0x04 0x17 0x00 0x9b 0x1c 0x7e
Got packet size 17
Segmentation fault: 11
 
I'll have to debug when I get more time.

Share this post


Link to post
Share on other sites

Went to the 'Alvieboy' on github, got that repository (I am using the one from GadgetFactory) and compiled.  I am able to load @ 115200!  Get same error @ 1M, but at least I can run.

 

Thanks!

Share this post


Link to post
Share on other sites

Yes, I'd like to :) Can you send it to my email (alvieboy@alvie.com) ?

 

Glad that fixes the MX chip issue. Regarding the 1Mbit speed, I am not actually sure what might be happening. Might be a driver, might be the code....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now