Przeglądaj źródła

DaynaPORT with 20 frames and USB disabled

Prefetch is set to 0, log buffer set to 2048
Morio 2 lat temu
rodzic
commit
5a0930fb52

+ 1 - 1
lib/SCSI2SD/src/firmware/network.h

@@ -31,7 +31,7 @@ extern "C" {
 #define SCSI_NETWORK_WIFI_CMD_JOIN			0x05
 
 #ifndef NETWORK_PACKET_QUEUE_SIZE
-# define NETWORK_PACKET_QUEUE_SIZE   10		// must be <= 255
+# define NETWORK_PACKET_QUEUE_SIZE   20		// must be <= 255
 #endif
 
 #define NETWORK_PACKET_MAX_SIZE     1520

+ 6 - 0
lib/ZuluSCSI_platform_RP2040/ZuluSCSI_platform.cpp

@@ -42,8 +42,10 @@
 #endif // __MBED__
 
 #ifndef __MBED__
+#ifndef ZULUSCSI_DAYNAPORT
 # include <SerialUSB.h>
 # include <class/cdc/cdc_device.h>
+#endif
 #else
 # include <USB/PluggableUSBSerial.h>
 #endif // __MBED__
@@ -365,7 +367,9 @@ void platform_late_init()
         gpio_conf(SCSI_IN_RST,    GPIO_FUNC_SIO, true, false, false, true, false);
 
 #ifndef __MBED__
+#ifndef ZULUSCSI_DAYNAPORT
     Serial.begin();
+#endif
 #endif // __MBED__
 
 #ifdef ENABLE_AUDIO_OUTPUT
@@ -501,6 +505,7 @@ static void usb_log_poll()
 {
     static uint32_t logpos = 0;
 #ifndef __MBED__
+# ifndef ZULUSCSI_DAYNAPORT
     if (Serial.availableForWrite())
     {
         // Retrieve pointer to log start and determine number of bytes available.
@@ -517,6 +522,7 @@ static void usb_log_poll()
         actual = Serial.write(data, len);
         logpos -= available - actual;
     }
+# endif
 #else
     if (_SerialUSB.ready())
     {

+ 0 - 7
lib/ZuluSCSI_platform_RP2040/rp2040-daynaport.ld

@@ -87,13 +87,6 @@ SECTIONS
         *libc*:*toa*(.text .text*)
         *libminIni.a:(.text .text*)
         *libCUEParser.a:(.text .text*)
-        *libpicow*(.text .text*)
-        *libpico.a:*usb*(.text .text*)
-        *libpico.a:*msc*(.text .text*)
-        *libpico.a:*tusb*(.text .text*)
-        *libpico.a:*hid*(.text .text*)
-        *libpico.a:*cdc*(.text .text*)
-        *libpico.a:*dcd*(.text .text*)
         /* RP2040 breakpoints in RAM code don't always work very well
          * because the boot routine tends to overwrite them.
          * Uncommenting this line puts all code in flash.

+ 5 - 3
platformio.ini

@@ -145,10 +145,10 @@ debug_build_flags =
     -O2 -ggdb -g3
     ; The values can be adjusted down to get a debug build to fit to SRAM
     -DLOGBUFSIZE=2048
-    -DPREFETCH_BUFFER_SIZE=2048
+    -DPREFETCH_BUFFER_SIZE=1024
     ; This controls the depth of 2 x NETWORK_PACKET_MAX_SIZE (1520 bytes)
     ; For example a queue size of 10 would be 10 x 2 x 1520 = 30400 bytes
-    -DNETWORK_PACKET_QUEUE_SIZE=3
+    -DNETWORK_PACKET_QUEUE_SIZE=12
 lib_deps =
     SdFat=https://github.com/rabbitholecomputing/SdFat#2.2.0-gpt
     minIni
@@ -167,17 +167,19 @@ build_flags =
     -DZULUSCSI_NETWORK
     -DZULUSCSI_DAYNAPORT
 ; These take a large portion of the SRAM and can be adjusted
+; USB has been disabled to free of more SRAM. The next two comments can be ignored
 ; It is important to leave enough free space for USB serial to work
 ;   Around 7220 bytes seems to be enough.
     -DLOGBUFSIZE=2048
     -DPREFETCH_BUFFER_SIZE=0
     ; This controls the depth of 2 x NETWORK_PACKET_MAX_SIZE (1520 bytes)
     ; For example a queue size of 10 would be 10 x 2 x 1520 = 30400 bytes
-    -DNETWORK_PACKET_QUEUE_SIZE=12
+    -DNETWORK_PACKET_QUEUE_SIZE=20
 ; build flags mirroring the framework-arduinopico#v3.6.0-DaynaPORT static library build
     -DPICO_CYW43_ARCH_POLL=1
 	-DCYW43_LWIP=0
 	-DCYW43_USE_OTP_MAC=0
+    -DPIO_FRAMEWORK_ARDUINO_NO_USB
 
 ; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB
 ; Differs in pinout from ZuluSCSI_RP2040 platform, but shares most of the code.