Переглянути джерело

Firmware compiles and links

Was able to get the firmware to link. There are a few outstanding
issues to take care of. They can be found by doing a project wide search
for '@TODO'.

Mainly erasing the flash to load firmware off the SD card.

There is also a DMA memory to memory transfer that needs to be
figured out.

And how to properly use GPIO_CTL for the F4xx compared to F20x's
GPIO_CTL0
Morio 3 роки тому
батько
коміт
63fdc43d17

+ 0 - 5
lib/ZuluSCSI_platform_GD32F450/scsi_accel_dma.cpp

@@ -447,9 +447,4 @@ void scsi_accel_dma_finishWrite(volatile int *resetFlag)
     scsi_accel_dma_stopWrite();
 }
 
-// @TODO check if these externs are need without greenpak
-extern const uint32_t g_scsi_out_byte_to_bop_pld1hi[256];
-extern const uint32_t g_scsi_out_byte_to_bop_pld1lo[256];
-
-
 #endif

+ 5 - 2
lib/ZuluSCSI_platform_GD32F450/sd_card_sdio.cpp

@@ -4,11 +4,14 @@
 #include "ZuluSCSI_platform.h"
 
 #ifdef SD_USE_SDIO
-
-#include "ZuluSCSI_log.h"
+extern "C"
+{
 #include "gd32f4xx_sdio.h"
 #include "gd32f4xx_dma.h"
 #include "gd32_sdio_sdcard.h"
+}
+
+#include "ZuluSCSI_log.h"
 #include <SdFat.h>
 
 static sd_error_enum g_sdio_error = SD_OK;

+ 1 - 1
platformio.ini

@@ -144,7 +144,7 @@ extra_scripts = src/build_bootloader.py
 debug_build_flags = -Os -ggdb -g3
 build_flags = 
      -Os -Wall -Wno-sign-compare -ggdb -g3 -Isrc
-     -D__SYSTEM_CLOCK_200M_PLL_IRC8M=200000000
+     -D__SYSTEM_CLOCK_200M_PLL_IRC16M=200000000
      -DSPI_DRIVER_SELECT=3
      -DSD_CHIP_SELECT_MODE=2
      -DENABLE_DEDICATED_SPI=1