troubles with spin2cppV102 + V100 + propeller-load big *.elf-Programs on PPB
nomad
Posts: 276
hi,
on this weekend i working with the spin2cpp Version V102 and V100:
with my ppbQuadV203.spin (as attachment):
- 1) if i work with spin2cpp V102 and my ppbQuadV203.spin on PowerShell under Win7 with:
- .\spin2cpp --elf -O -o ppbQuadV202.elf ppbQuadV202.spin
- Failure with:
Servo32v7.cpp:20:9: error: 'Servo32v7' has not been declared
if i make the same Stuff with spin2cpp V100: aka
- .\spin2cpp --elf -O -o ppbQuadV202.elf ppbQuadV202.spin
- convert OK, output: a.out
- is this a bug on V102 ??? i dont know.
- 2) on V100: i can convert my big ppbQuadV203.spin as:
- compile: .\spin2cpp --elf -Os -mxmmc ppbQuadV203.spin
- compile OK
- output: a.out
- rename a.out to ppbQuadV203.elf OK
- 3) experiments with propeller-load.exe and ppbQuadV203.elf
- 1) first run with:
- propeller-load -p5 -r ppbQuadV203.elf
- failure:
- Failure error: no cache driver to load external image
error: load failed
- 2) second run with:
- propeller-load -b PPUSB -p5 -r -z a.out -r -z
- output:
load the serial helper to hub memory
9528 bytes sent
verrifing RAM ... OK
Loading 'a.pax' to SD card
timeout waiting for ACK/NAK
error SendPacket DATA failed
error: load failed
now i dont know whats going wrong:
what make i wrong:
Thanks for help, and hints
regards nomad
on this weekend i working with the spin2cpp Version V102 and V100:
with my ppbQuadV203.spin (as attachment):
- 1) if i work with spin2cpp V102 and my ppbQuadV203.spin on PowerShell under Win7 with:
- .\spin2cpp --elf -O -o ppbQuadV202.elf ppbQuadV202.spin
- Failure with:
Servo32v7.cpp:20:9: error: 'Servo32v7' has not been declared
if i make the same Stuff with spin2cpp V100: aka
- .\spin2cpp --elf -O -o ppbQuadV202.elf ppbQuadV202.spin
- convert OK, output: a.out
- is this a bug on V102 ??? i dont know.
- 2) on V100: i can convert my big ppbQuadV203.spin as:
- compile: .\spin2cpp --elf -Os -mxmmc ppbQuadV203.spin
- compile OK
- output: a.out
- rename a.out to ppbQuadV203.elf OK
- 3) experiments with propeller-load.exe and ppbQuadV203.elf
- 1) first run with:
- propeller-load -p5 -r ppbQuadV203.elf
- failure:
- Failure error: no cache driver to load external image
error: load failed
- 2) second run with:
- propeller-load -b PPUSB -p5 -r -z a.out -r -z
- output:
load the serial helper to hub memory
9528 bytes sent
verrifing RAM ... OK
Loading 'a.pax' to SD card
timeout waiting for ACK/NAK
error SendPacket DATA failed
error: load failed
now i dont know whats going wrong:
what make i wrong:
Thanks for help, and hints
regards nomad
spin
67K
Comments
You need to have all the OBJ files in the same folder. If you've already done that, can you post the full source code so that we can try to reproduce your problems?
Also, have you tried using the --main option? I don't know if spin2cpp will work without it.
For 2) (the sd card load error)
Have you made sure that your board pinout confirms to this?
thanks for your answer:
i make following tasks:
no. 1)
- convert ppbQuadV203.spin
- with spin2cpp V100 as:
-.\spin2cpp --elf -O -o ppbQuadV203.elf ppbQuadV203.spin
- failure as:
- c:/propgcc/bin/../lib/gcc/propeller-elf/4.6.1../../../../propeller-elf/bin/ld.exe:
ppbQuadV203.elf section '.text' will not fit in region 'hub
c:/propgcc/bin/../lib/gcc/propeller-elf/4.6.1../../../../propeller-elf/bin/ld.exe:
region 'hub' overflow by 11400 bytes
collect2: ld ret urned 1 exit status
- if convert with spin2ccp V100 as:
.\spin2cpp --elf -Os -mxmmc ppbQuadV203.spin
- convert OK
- I have now a.out File (ppbQuadV203.cpp)
- solong all ok
- 1.2) convert with spin2cpp V102
- with ppbQuadV203.spin as:
- .\spin2cpp --elf -O -o ppbQuadV203.elf ppbQuadV203.spin
- Failure:
- Servo32v.7.cpp:20.9: error: 'Servo32v7' hav not been declared
- as attachment:
- V100-ppbQuadV203.cpp
- V102-ppbQuadV203.cpp
no 2) the sd-card load error....
- i have the proplem that i have converted the spin-file with the -option -mxmmc
- and i found nothing (under SimpleIDE) board-Type: only the wrong PPUSB-Type
- on my PPB i havent a SD-Card: its my fault:
- but how can i load my a.out == ppbQuadV203.elf into the PPB ???
- on the Loader.pdf -> 3.2.1 above XMM its only for the C3-board
as: propeller-load -b c3 myprog.elf -e -r -t
- now i load my ppbQuadV203.elf (aka a.out) into the ppb
- 1) rename a.out into ppbQuadV203.elf
- 2) as: propeller-load -p5 ppbQuadV203.elf -e -r -t
Failure as:
error: no cache driver to load external image
error: load failed
- 3) if i load the stuff with
- propeller-load -p5 -l ppbQuadV203.elf -r -t
Failure as:
error: missing sdspi-do pin configurations
error: loading serial helper
error: load failed
- in the moment i cant load *.elf with XMM to my ppb.
Have you some tips and hints for this faults??
excuse my bad english
regards nomad
I also notice that in 1.2 you don't use the exact same command that you did with 1 (-elf -Os -mxmmc). It's probably not the cause, but it's better to eliminate all differences.
For 2) Can you follow through these steps, and verify that you're able to get the code working: http://code.google.com/p/propgcc/wiki/PropGccLoader#XMMC_SD_Example
Post #6 here also has good information: http://forums.parallax.com/showthread.php?136382-Running-large-Propeller-Programs-from-EEPROM-or-SDCARD
You should make sure that it works with a known good program before you work on your own.
Thanks,
Eric
You have found a bug in spin2cpp v1.02; the DAT section output is wrong for objects whose name gets changed (see the spin2cpp Readme.txt for the rules about object names being translated to C++ object names). I'll fix that in the next version of spin2cpp. For now, you can work around it by changing the name of Servo32v7 to SERVO32v7 everywhere. Or, you can keep using spin2cpp 1.00 if that works for you.
Thanks for the bug report,
Eric
thanks for the answers:
today i make following tasks:
@ SRLM and ersmith:
- No. 1) convert spin to *.elf
- convert ppbQuadV203.spin to a.out -> *.elf
- 1) with spin2cpp V1.02:
the whole stuff (spin, *.h + *.cpp - files are in
-> convertSpin2cppV1-02:
- spin2cpp.exe is the V1.02:
- 2) now convert to a.out -> *.elf with
.\spin2cpp --elf -O -o ppbQuadV203.elf ppbQuadV203.spin
-> Failure : Servo32v7.cpp:20:9
error: 'Servo32v7' has not been declared
-> look at Servo32v7.cpp
- please have a look on V102: Servo32v7.cpp
- on 20: uint8_t Servo32v7::dat[] = {
- on V100: Servo32v7.cpp
- on 20: uint8_t Servo32v7Spin::dat[] = {
- i think here is ev. a failure or a bug ????
- No. 2)
- convert ppbQuadV203.spin to a.out -> *.elf
in folder: convertSpin2cppV1-00
- spin2cpp.exe
- 1) with: .\spin2cpp --elf -O -o ppbQuadV203.elf ppbQuadV203.spin
Failure:
- c:/propgcc/bin/../lib/gcc/propeller-elf/4.6.1../../../../propeller-elf/bin/ld.exe:
ppbQuadV203.elf section '.text' will not fit in region 'hub
c:/propgcc/bin/../lib/gcc/propeller-elf/4.6.1../../../../propeller-elf/bin/ld.exe:
region 'hub' overflow by 11400 bytes
collect2: ld ret urned 1 exit status
- No. 3)
- under Folder convertSpin2cppV1-00-XMMC
- with spin2cpp.exe (V1-00)
- 1) with: .\spin2cpp --elf -Os -mxmmc ppbQuadV203.spin
- convert OK
- output: a.out
- rename to: ppbQuadV203.elf
No. 2) loading ppbQuadV203.elf into PropProtoBoard
- no SD-Card
- files are in convertSpin2cppV1-00-XMMC
- file:///C:/Users/nomad/Desktop/LARGE-PROGRAMMS/runningLargePropPrograms-from-EEPROM-SDCARD-1912-showthread.php.htm
- now i have a a.out - file and a *.elf - file
- in the thread from jazzed #2
- as: propeller-load -r -t a.out -b eeprom
- i think the loading is ok
under Folder: convertSpin2cppV1-00-XMMC
as: propLoadOK.jpg or propLoad-OK-1912.jpg
- a hint in the original ppbQuadV203.spin
- is a pst.statement (LoadTest)
- if i running the spinProg with PropTool and Pst
- on the Console -> is the pst-statement
- with propLoad only statement ESC last line
but i think loading is OK
i hope my statements are clear
Thanks for help tips and hints
attachments with convertLoadLargeProgs.zip-file (convertLoadLargeProgs)
convertSpin2cppV1-00
convertSpin2cppV1-02
convertSpin2cppV1-00-Xmmc
regards
nomad
#1
This appears to be a bug in Spin2Cpp1.02. The issue is that Spin2Cpp will add "spin" to some of the class names, but in this case it didn't do it with the dat section. You can fix this by making it match the classname that is on the functions below (in this case, "Servo32v7Spin").
Good catch.
#2
The issue is that your compiled code is too big to fit into the HUB. You should try compiling with -Os and -mcmm (or one of the external memories). If that doesn't work, you'll have to cut out portions of your program.
#3
What is the issue here? I'm not following. At least from this link, for XMMC code you need to insert the SD card into your computer and write a .pex file to the card.
----
One suggestion about receiving help from forum posts: it would be easier on responders if you made sure to format your posts, and use full sentences and descriptions. I know that I've been struggling to decipher the steps are that you took, and that (along with the busy holidays) is why it's taken me a while to respond. It's generally better to provide as many small details as possible.
thanks for your response:
excume my confusion (with my stuff) :-)
#1
on the weekend i make some experiments with your fix...
if i have troubles then i working with spin2cppV1.00.exe
To #2 and # 3:
in my *.zip-file are 3 folders:
all have the same spinFiles: ppbQuadV203.spin and the SpinObjects
no1. = convertSpin2cppV1-02:
- is the Bug (your #1)
no2. = converSpin2cppV1-00:
this is your #2:
HUB-Failure: as
- .\spin2cpp --elf -O -o ppbQuadV203.elf ppbQuadV203.spin
- failure as:
- c:/propgcc/bin/../lib/gcc/propeller-elf/4.6.1../../../../propeller-elf/bin/ld.exe:
ppbQuadV203.elf section '.text' will not fit in region 'hub
c:/propgcc/bin/../lib/gcc/propeller-elf/4.6.1../../../../propeller-elf/bin/ld.exe:
region 'hub' overflow by 11400 bytes
collect2: ld ret urned 1 exit status
no3. = convertSpin2cppV1-00-XMMC
i must say that:
- 1) i havent a sd-card on PropellerProtoBoard
- 2) in the moment i dont work with the PropellerIDE or propeller-gcc-elf
this comes later
your # 3:
in this folder i make following Tasks on the PowerShell on Win7:
- 1) with spin2cpp.exe Version 1.00 as:
- .\spin2cpp --elf -Os -mxmmc ppbQuadV203.spin
- Run OK
- output: a.out (rename to ppbQuadV203.elf)
- 2) with propeller-load.exe
- propeller-load -r -t a.out -b -eeprom
- Run OK
- Output:
Propeller Version 1 on COM5
Loading the serial helper to hub memory
9528 bytes sent
Verifying RAM...OK
Loading cache driver 'eeprom_cache.dat'
1532 bytes sent
Loading program image to flash
36524 bytes sent
Loading .xmmkernel
1720 bytes sent
[ Entering terminal mode. Type ESC or Control-C to exit. ]
i think : i can now convert a large SpinFile into a Bunch of *.cpp-Files
and i can upload the a.out to my PPB
should be ok
my next steps are : develop my own ppbQuadV203... (*.c or *.cpp)
with SimpleIDE or with propeller-gcc-elf to a.out or *.elf-file
and loading this to my PPB
thanks for your help
regards nomad