flash.write(min(a), code)
# 0xffd0 -- 0xffff are interrupt vectors
-# gcc et.al. for some reason do not give a value for 0xfffe word
-# the flash loader in ROM jumps to addr pointed here
-# force to start of RAM
#
# the flash uses 256-byte pages, include code from 0xff00 - 0xffcf
# as it was excluded above
- vectors = ''.join([chr(h[i]) for i in range(0xff00, 0x10000-2)])
- #vectors += '\x00\x40'
vectors = ''.join([chr(h[i]) for i in range(0xff00, 0x10000)])
+ vectors = '\x00\x40' * 128
flash.write(0xff00, vectors)
while not flash.isReady():