Mistery,
I've added SRAM support to my bootloader using 'glue_bram32_sram8_c2' module. But it seems that there are some problems regarding it:
First I could not upload my sketch to SRAM. Although the sketch uploads without any CRC error, But nothing runs
Second, I tried to verify SRAM operation using a simple sketch:
volatile uint16_t *vram = (volatile uint16_t *) 0x80000000;
#define ramsize 1024*2 // testing first 2KB section of 512K*8bit SRAM
void setup() {
//Initialize serial and wait for port to open:
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
delay(2000);
Serial.println("Starting test ... \n");
int i;
for (i=0; i < ramsize; i++)
vram[i] = i;
for (i=0; i < ramsize; i++)
{
Serial.print("0x");
Serial.print(vram[i], HEX);
Serial.println("\n");
//delay(10);
}
}
void loop() {
}
The output is:
0x7
0x100
0x200
0x300
0x400
0x500
0x600
0x700
....
0xFD07
0xFE07
0xFF07
It seems that the High and Low byte positions are swapped!
May you run the sketch on your own board and tell me the result?
the current bootloader source could be found here.
Regards,
Mahmoud