Shop OBEX P1 Docs P2 Docs Learn Events
Help with propeller load — Parallax Forums

Help with propeller load

Dr_AculaDr_Acula Posts: 5,484
edited 2014-03-16 06:34 in Propeller 1
Almost working!

On the PropTool F10 sends to ram, and F11 sends to eeprom.

For large C programs (bigger than hub) there are several options and I'm using external ram as the equivalent of F10, and loading programs from SD card to external ram as the equivalent of F11.

Loading to ram with the -r option in propeller-load works fine.

However loading from eeprom doesn't quite seem to work. It is writing a file 'autorun.pex' on the SD card and this is the correct size. However it does not seem to reading this on startup.

The config file is
# 23LC1024.cfg
    clkfreq: 80000000
    clkmode: XTAL1+PLL16X
    baudrate: 115200
    rxpin: 31
    txpin: 30
    cache-driver: spi_sram24_cache.dat
    cache-size: 8K
    cache-param1: 0x090B0A01 # 0xooiiccpp - oo=mosi ii=miso cc=sck pp=cs-protocol
    cache-param2: 0x08000000 # 0xssxxxxxx - ss=cs
    sd-driver: sd_driver.dat
    sdspi-do: 15
    sdspi-clk: 14
    sdspi-di: 13
    sdspi-cs: 12
 load-target: ram

and the batch file is
spin2cpp --elf -o kyedos.elf -Os  -mxmmc KyeDOS3.spin
propeller-load.exe -I C:/propgcc/propeller-load/ -b 23LC1024 -p COM6 kyedos.elf -l -e -r -t
pause

and the output is (ignore the two cast warnings from spin2cpp)
C:\Propeller\spin2cpp>spin2cpp --elf -o kyedos.elf -Os  -mxmmc KyeDOS3.spin
ASCII0_STREngine.cpp: In member function 'int32_t ASCII0_STREngine::Tokenizestring(int32_t)':
ASCII0_STREngine.cpp:144:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ASCII0_STREngine.cpp:145:59: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

C:\Propeller\spin2cpp>propeller-load.exe -I C:/propgcc/propeller-load/ -b 23LC1024 -p COM6 kyedos.elf -l -e -r -t
Propeller Version 1 on COM6
Loading the serial helper to hub memory
9528 bytes sent
Verifying RAM ... OK
Loading 'kyedos.pex' to SD card
60024 bytes sent
Loading sd_loader.elf to EEPROM via hub memory
16372 bytes sent
Verifying RAM ... OK
Programming EEPROM ... OK
Verifying EEPROM ... OK
[ Entering terminal mode. Type ESC or Control-C to exit. ]
Loading SD driver
Loading cache driver
Initializing SD card
Mounting filesystem
Opening 'autorun.pex'
Starting kernel
Loading RAM at 0x30000000

rebooting the propeller runs from "Loading SD driver" onwards. So the problem appears to be loading ram from the SD card.

Is the syntax above correct?

And if so, would there be a way to find out if it is hanging, what it is doing on that last line etc?

Any help would be most appreciated :)

Comments

  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-16 05:53
    Dr_Acula wrote: »
    Almost working!

    On the PropTool F10 sends to ram, and F11 sends to eeprom.

    For large C programs (bigger than hub) there are several options and I'm using external ram as the equivalent of F10, and loading programs from SD card to external ram as the equivalent of F11.

    Loading to ram with the -r option in propeller-load works fine.

    However loading from eeprom doesn't quite seem to work. It is writing a file 'autorun.pex' on the SD card and this is the correct size. However it does not seem to reading this on startup.

    The config file is
    # 23LC1024.cfg
        clkfreq: 80000000
        clkmode: XTAL1+PLL16X
        baudrate: 115200
        rxpin: 31
        txpin: 30
        cache-driver: spi_sram24_cache.dat
        cache-size: 8K
        cache-param1: 0x090B0A01 # 0xooiiccpp - oo=mosi ii=miso cc=sck pp=cs-protocol
        cache-param2: 0x08000000 # 0xssxxxxxx - ss=cs
        sd-driver: sd_driver.dat
        sdspi-do: 15
        sdspi-clk: 14
        sdspi-di: 13
        sdspi-cs: 12
     load-target: ram
    

    and the batch file is
    spin2cpp --elf -o kyedos.elf -Os  -mxmmc KyeDOS3.spin
    propeller-load.exe -I C:/propgcc/propeller-load/ -b 23LC1024 -p COM6 kyedos.elf -l -e -r -t
    pause
    

    and the output is (ignore the two cast warnings from spin2cpp)
    C:\Propeller\spin2cpp>spin2cpp --elf -o kyedos.elf -Os  -mxmmc KyeDOS3.spin
    ASCII0_STREngine.cpp: In member function 'int32_t ASCII0_STREngine::Tokenizestring(int32_t)':
    ASCII0_STREngine.cpp:144:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    ASCII0_STREngine.cpp:145:59: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    
    C:\Propeller\spin2cpp>propeller-load.exe -I C:/propgcc/propeller-load/ -b 23LC1024 -p COM6 kyedos.elf -l -e -r -t
    Propeller Version 1 on COM6
    Loading the serial helper to hub memory
    9528 bytes sent
    Verifying RAM ... OK
    Loading 'kyedos.pex' to SD card
    60024 bytes sent
    Loading sd_loader.elf to EEPROM via hub memory
    16372 bytes sent
    Verifying RAM ... OK
    Programming EEPROM ... OK
    Verifying EEPROM ... OK
    [ Entering terminal mode. Type ESC or Control-C to exit. ]
    Loading SD driver
    Loading cache driver
    Initializing SD card
    Mounting filesystem
    Opening 'autorun.pex'
    Starting kernel
    Loading RAM at 0x30000000
    

    rebooting the propeller runs from "Loading SD driver" onwards. So the problem appears to be loading ram from the SD card.

    Is the syntax above correct?

    And if so, would there be a way to find out if it is hanging, what it is doing on that last line etc?

    Any help would be most appreciated :)
    Try adding this line to your .cfg file:
    load-target: ram
    
    I'll post a message saying why this is necessary later. Got to run now.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2014-03-16 06:09
    Thanks for the reply. load-target: ram is already in the cfg file (see listing above, that line is half being trimmed off by my browser)

    Load from PC to ram seems to work. It is the load from SD to ram that seems to not be working. Cheers, Drac,
  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-16 06:34
    Dr_Acula wrote: »
    Thanks for the reply. load-target: ram is already in the cfg file (see listing above, that line is half being trimmed off by my browser)

    Load from PC to ram seems to work. It is the load from SD to ram that seems to not be working. Cheers, Drac,
    Okay, sorry. I missed that line. I guess I'll have to try the SD loader to see if maybe there is a problem with that.
Sign In or Register to comment.