OpenCores
URL https://opencores.org/ocsvn/ion/ion/trunk

Subversion Repositories ion

[/] [ion/] [trunk/] [src/] [sdboot/] [sdboot.c] - Diff between revs 248 and 249

Show entire file | Details | Blame | View Log

Rev 248 Rev 249
Line 40... Line 40...
    UINT wr_index = 0;
    UINT wr_index = 0;
    void (*target_fn)(void) = (void *)0x00000000;
    void (*target_fn)(void) = (void *)0x00000000;
 
 
 
 
    printf("ION SD loader -- " __DATE__ "\n\n");
    printf("ION SD loader -- " __DATE__ "\n\n");
    printf("Loading file '/code.bin' onto RAM at address 0x00000000...\n");
 
 
 
 
 
    WRPORT(0,0x17890083);
 
 
 
 
 
        f_mount(0, &Fatfs);              /* Register volume work area (never fails) */
        f_mount(0, &Fatfs);              /* Register volume work area (never fails) */
 
 
        rc = f_open(&Fil, "CODE.BIN", FA_READ);
        rc = f_open(&Fil, "CODE.BIN", FA_READ);
        if (rc) die(rc);
        if (rc) die(rc);
 
 
 
    printf("Loading file '/code.bin' onto RAM at address 0x00000000...\n");
 
 
        for (;;) {
        for (;;) {
                rc = f_read(&Fil, Buff, sizeof Buff, &br);      /* Read a chunk of file */
                rc = f_read(&Fil, Buff, sizeof Buff, &br);      /* Read a chunk of file */
                if (rc || !br) break;                   /* Error or end of file */
                if (rc || !br) break;                   /* Error or end of file */
                for (i = 0; i < br; i++){       /* Type the data */
                for (i = 0; i < br; i++){       /* Type the data */
                        target[wr_index] = Buff[i];
                        target[wr_index] = Buff[i];

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.