Explorar o código

Fix pulling in the wrong libraries on other builds

Hiding the whole cpp file instead of the include
Morio %!s(int64=2) %!d(string=hai) anos
pai
achega
83010a283d

+ 1 - 1
lib/ZuluSCSI_platform_GD32F205/ZuluSCSI_platform.cpp

@@ -247,7 +247,7 @@ void platform_init()
 void platform_late_init()
 {
     // Initialize usb for CDC serial output
-    usb_fs_init();
+    usb_serial_init();
 
     logmsg("Platform: ", g_platform_name);
     logmsg("FW Version: ", g_log_firmwareversion);

+ 2 - 1
lib/ZuluSCSI_platform_GD32F205/ZuluSCSI_platform.h

@@ -28,7 +28,6 @@
 #include <gd32f20x_gpio.h>
 #include <scsi2sd.h>
 
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -59,6 +58,8 @@ extern const char *g_platform_name;
 #   define PLATFORM_OPTIMAL_MIN_SD_WRITE_SIZE 4096
 #   define PLATFORM_OPTIMAL_MAX_SD_WRITE_SIZE 65536
 #   define PLATFORM_OPTIMAL_LAST_SD_WRITE_SIZE 8192
+#   define ZULUSCSI_HARDWARE_CONFIG
+#   include "platform_hw_config.h"
 #   include "ZuluSCSI_v1_2_gpio.h"
 #endif
 

+ 1 - 1
lib/ZuluSCSI_platform_GD32F205/platform_hw_config.cpp

@@ -18,10 +18,10 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 **/
+#include "ZuluSCSI_platform.h"
 
 #ifdef ZULUSCSI_HARDWARE_CONFIG
 #include "platform_hw_config.h"
-#include "ZuluSCSI_platform.h"
 #include "ZuluSCSI_config.h"
 
 HardwareConfig g_hw_config;

+ 1 - 1
lib/ZuluSCSI_platform_GD32F205/usb_serial.cpp

@@ -33,7 +33,7 @@ usb_core_driver cdc_acm;
 }
 
 
-void usb_fs_init(void)
+void usb_serial_init(void)
 {
     // set USB full speed prescaler and turn on USB clock
     rcu_usbfs_trng_clock_config(RCU_CKUSB_CKPLL_DIV2_5);

+ 1 - 4
lib/ZuluSCSI_platform_GD32F205/usb_serial.h

@@ -19,13 +19,10 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 **/
 
-
 #pragma once
 
-#include <gd32f20x.h>
-
 // init USB full speed interface
-void usb_fs_init(void);
+void usb_serial_init(void);
 // check if the USB serial interface is ready to send data
 bool usb_serial_ready(void);
 // Send data of the USB serial interface

+ 0 - 2
platformio.ini

@@ -93,7 +93,6 @@ build_flags =
      -DPIO_USBFS_DEVICE_CDC
      -DHAS_SDIO_CLASS
      -DZULUSCSI_V1_2
-     -DZULUSCSI_HARDWARE_CONFIG
 
 ; ZuluSCSI RP2040 hardware platform, based on the Raspberry Pi foundation RP2040 microcontroller
 [env:ZuluSCSI_RP2040]
@@ -104,7 +103,6 @@ extra_scripts = src/build_bootloader.py
 platform_packages = platformio/toolchain-gccarmnoneeabi@1.100301.220327
 board_build.ldscript = lib/ZuluSCSI_platform_RP2040/rp2040.ld
 ldscript_bootloader = lib/ZuluSCSI_platform_RP2040/rp2040_btldr.ld
-lib_ignore = ZuluSCSI_platform_GD32F205
 lib_deps =
     SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.0-gpt
     minIni

+ 1 - 3
src/ZuluSCSI.cpp

@@ -54,9 +54,7 @@
 #include "ZuluSCSI_disk.h"
 #include "ZuluSCSI_initiator.h"
 #include "ROMDrive.h"
-#ifdef ZULUSCSI_HARDWARE_CONFIG
-# include "platform_hw_config.h"
-#endif
+
 SdFs SD;
 FsFile g_logfile;
 static bool g_romdrive_active;