Shop OBEX P1 Docs P2 Docs Learn Events
Self starting p1v — Parallax Forums

Self starting p1v

pik33pik33 Posts: 2,366
edited 2014-10-04 05:49 in Propeller 1
I made some changes in booter, so when it cannot boot from PC it starts from its RAM.
To do this, I used unscrambled Propeller.

In hub_mem.v:
initial
begin

   $readmemh ("unscrambledrom.hex", rom_high);
   $readmemh ("test4.hex", ram3);    
   $readmemh ("test3.hex", ram2);
   $readmemh ("test2.hex", ram1);    
   $readmemh ("test1.hex", ram0);
    
end


I wrote a short program in Lazarus to convert .eeprom file to test1..4.hex

To make self startting p1v,

(1) use unscrambled p1v
(2) make changes to hub_mem.v as above
(3) use attached unscrambledrom.hex instead of original
(4) compile spin program to .eeprom
(5) use attached exe to convert .eeprom to 4 testx.hex files. The exe is 64bit. If you have 32bit system or not Windows system, recompile from the source (Lazarus needed)
(6) place testx.hex files in quartus project directory
(7) compile quartus project

After programming the fpga, the propeller will start with your program. If you make .pof, the propeller will start with your program after you switch your board on

This version of p1v will not work with real eeprom. There is possibility to change the booter so it will start the preprogrammed code only when it cannot find eeprom, but it will need some more hacking :)

Comments

  • pik33pik33 Posts: 2,366
    edited 2014-10-04 02:32
    As a test of the new possibility, this is a self starting p1v 1920x1200 vga demo for de2-115. Simply attach a vga 1920x1200 monitor to de2-115, program and enjoy :)
  • ozpropdevozpropdev Posts: 2,792
    edited 2014-10-04 05:17
    Just loaded my DE2-115 with your self-booting demo. Looks good :)
  • roglohrogloh Posts: 5,791
    edited 2014-10-04 05:21
    Nice one pik33. This will be great for setups without the full i2c bootrom fitted, like a DE-0 nano.

    Do you have your particular source mods of booter.src available? I didn't want to have to reverse engineer your hex file to see what you've changed. Yeah, feeling lazy today. :smile: I'd guess it was just patching the jumps to the boot label into jumps to the launch label but didn't dig any further.

    Good work.
  • pik33pik33 Posts: 2,366
    edited 2014-10-04 05:49
    I modded the hex file looking at compiled booter from Chip's source :) There are 4 instances of jmp #boot there which I replaced with jmp #launch. In hex file I had to find these codes and replace 57 with 5E.Then I had to write eeprom to hex converter which can produce 4 hex files to init p1v ram.
Sign In or Register to comment.