Merge branch 'main' of ssh://git.skullspire.com:2222/lukas/Nova64

This commit is contained in:
Lukas Höppner
2026-08-21 22:23:13 +02:00
4 changed files with 55 additions and 46 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
"cmake.configureOnOpen": true, "cmake.configureOnOpen": true,
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"cmake.cmakePath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin\\cmake.exe", //"cmake.cmakePath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin\\cmake.exe",
"cmake.configureSettings": { "cmake.configureSettings": {
"BUILD_SIMULATOR": "ON" "BUILD_SIMULATOR": "ON"
} }
+40 -43
View File
@@ -22,51 +22,51 @@ A concise 32-pin cartridge interface for expansion modules, storage, I/O, and op
| 1 | GND | ground | grounded | | 1 | GND | ground | grounded |
| 2 | VCC_3V3 | supply | N/A | | 2 | VCC_3V3 | supply | N/A |
| 3 | CARTRIDGE_DET | cartridge presence detect | pull-up | | 3 | CARTRIDGE_DET | cartridge presence detect | pull-up |
| 4 | POWER_CTRL | power direction control | pull-down | | 4 | USB_FLAG | USB-capable flag | pull-up |
| 5 | USB_FLAG | USB-capable flag | pull-up | | 5 | USB_DP | USB D+ | pull-down |
| 6 | USB_DP | USB D+ | pull-down | | 6 | USB_DM | USB D- | pull-down |
| 7 | USB_DM | USB D- | pull-down | | 7 | | | |
| 8 | USB_ID | USB host/device mode | pull-up | | 8 | | | |
| 9 | USB_VBUS | VBUS sense / optional power | pull-down | | 9 | SD_CMD | SDMMC command / host->cartridge control | pull-up |
| 10 | SD_CMD | SDMMC command / host->cartridge control | pull-up | | 10 | SD_CLK | SDMMC clock / host->cartridge | pull-down |
| 11 | SD_CLK | SDMMC clock / host->cartridge | pull-down | | 11 | SD_D0 | SDMMC data0 (bi-directional) | pull-up |
| 12 | SD_D0 | SDMMC data0 (bi-directional) | pull-up | | 12 | SD_D1 | SDMMC data1 (bi-directional) | pull-up |
| 13 | SD_D1 | SDMMC data1 (bi-directional) | pull-up | | 13 | SD_D2 | SDMMC data2 (bi-directional) | pull-up |
| 14 | SD_D2 | SDMMC data2 (bi-directional) | pull-up | | 14 | SD_D3 | SDMMC data3 (bi-directional) | pull-up |
| 15 | SD_D3 | SDMMC data3 (bi-directional) | pull-up | | 15 | I2C_SCL | I2C clock | pull-up |
| 16 | I2C_SCL | I2C clock | pull-up | | 16 | I2C_SDA | I2C data | pull-up |
| 17 | I2C_SDA | I2C data | pull-up | | 17 | | | |
| 18 | I2S_SCLK | I2S bit clock | pull-down | | 18 | I2S_WS | I2S word select | pull-down |
| 19 | I2S_WS | I2S word select / frame clock | pull-down | | 19 | I2S_SD | I2S data out | pull-down |
| 20 | I2S_SDOUT | I2S data out (cartridge->host) | pull-down | | 20 | I2S_SCK | I2S clock | pull-down |
| 21 | I2S_SDIN | I2S data in (host->cartridge) | pull-down | | 21 | I2S_MCLK | I2S master clock | |
| 22 | I2S_MCLK | I2S master clock | pull-down | | 22 | SPI_MOSI | SPI MOSI (host->cartridge) | pull-down |
| 23 | SPI_MOSI | SPI MOSI (host->cartridge) | pull-down | | 23 | SPI_MISO | SPI MISO (cartridge->host) | pull-down |
| 24 | SPI_MISO | SPI MISO (cartridge->host) | pull-down | | 24 | SPI_SCLK | SPI clock (host->cartridge) | pull-down |
| 25 | SPI_SCLK | SPI clock (host->cartridge) | pull-down | | 25 | SPI_CS0 | SPI chip select (host->cartridge) | pull-down |
| 26 | SPI_CS0 | SPI chip select (host->cartridge) | pull-down | | 26 | CAN_H | CAN high | recessive bias |
| 27 | CAN_H | CAN high | recessive bias | | 27 | CAN_L | CAN low | recessive bias |
| 28 | CAN_L | CAN low | recessive bias | | 28 | UART_RX | UART RX (host->cartridge) | pull-up |
| 29 | UART_RX | UART RX (host->cartridge) | pull-up | | 29 | UART_TX | UART TX (cartridge->host) | pull-up |
| 30 | UART_TX | UART TX (cartridge->host) | pull-up | | 30 | VCC_5V | supply | N/A |
| 31 | VCC_5V | supply | N/A | | 31 | GND | ground | grounded |
| 32 | GND | ground | grounded | | 30 | EXT_5V | external power supply (optional) | N/A |
## Signal Groups ## Signal Groups
- Ground: pins 1, 32 - Ground: pins 1, 31
- 3.3V supply: pin 2 - 3.3V supply: pin 2
- Cartridge detection: pin 3 - Cartridge detection: pin 3
- Power direction: pin 4 - USB detection: pin 4
- USB flag: pin 5 - USB: pins 5-6
- USB: pins 6-9 - SDMMC: pins 9-14
- SDMMC: pins 10-15 - I2C: pins 15-16
- I2C: pins 16-17 - I2S audio: pins 17-21
- I2S audio: pins 18-22 - SPI: pins 22-25
- SPI: pins 23-26 - CAN: pins 26-27
- CAN: pins 27-28 - UART: pins 28-29
- UART: pins 29-30 - 5V supply: pin 30
- 5V supply: pin 31 - Optional external 5V supply: pin 30
## Design Rationale ## Design Rationale
@@ -85,7 +85,6 @@ A concise 32-pin cartridge interface for expansion modules, storage, I/O, and op
- Cartridge features such as SD/storage, I2C, SPI, CAN, UART and audio should be discovered dynamically at runtime after insertion. - Cartridge features such as SD/storage, I2C, SPI, CAN, UART and audio should be discovered dynamically at runtime after insertion.
- For bidirectional power delivery, the system should use a dedicated power-path controller and a clear source priority scheme. - For bidirectional power delivery, the system should use a dedicated power-path controller and a clear source priority scheme.
- Monitor main device and cartridge voltage presence before enabling any power path. - Monitor main device and cartridge voltage presence before enabling any power path.
- Use POWER_CTRL as a control input for a power-path switch or enable pin, not as a current-carrying line.
- If the main device is powered and the cartridge is not actively supplying power, keep cartridge supply disabled. - If the main device is powered and the cartridge is not actively supplying power, keep cartridge supply disabled.
- If the main device is unpowered and a powered cartridge is inserted, allow the cartridge to supply the system after voltage stability is confirmed. - If the main device is unpowered and a powered cartridge is inserted, allow the cartridge to supply the system after voltage stability is confirmed.
- Prevent backfeed by using ideal diodes or bidirectional power-path ICs that only conduct from the active source. - Prevent backfeed by using ideal diodes or bidirectional power-path ICs that only conduct from the active source.
@@ -100,8 +99,6 @@ Suggested cartridge categories:
USB_FLAG = 1 indicates the cartridge can present USB functionality in addition to its category. USB_FLAG = 1 indicates the cartridge can present USB functionality in addition to its category.
POWER_CTRL = 1 indicates the cartridge provides power to the main device
--- ---
A short technical reference for the Nova64 cartridge connector, intended for initial design discussion. A short technical reference for the Nova64 cartridge connector, intended for initial design discussion.
+13 -1
View File
@@ -64,7 +64,7 @@ else()
if(WIN32) if(WIN32)
set(FREERTOS_PORT "MSVC_MINGW" CACHE STRING "") set(FREERTOS_PORT "MSVC_MINGW" CACHE STRING "")
else() else()
set(FREERTOS_PORT "GCC/POSIX" CACHE STRING "") set(FREERTOS_PORT "GCC_POSIX" CACHE STRING "")
endif() endif()
# Select FreeRTOS heap implementation (provides pvPortMalloc/vPortFree) # Select FreeRTOS heap implementation (provides pvPortMalloc/vPortFree)
set(FREERTOS_HEAP 4 CACHE STRING "FreeRTOS Heap Implementation") set(FREERTOS_HEAP 4 CACHE STRING "FreeRTOS Heap Implementation")
@@ -102,6 +102,18 @@ else()
FetchContent_MakeAvailable(FreeRTOS_Kernel wamr_runtime) FetchContent_MakeAvailable(FreeRTOS_Kernel wamr_runtime)
# --------------------------------------------------------------------------
# Force -fPIC for FreeRTOS targets (required for linking into .so)
# --------------------------------------------------------------------------
if(NOT WIN32)
if(TARGET freertos_kernel)
set_target_properties(freertos_kernel PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
if(TARGET freertos_kernel_port)
set_target_properties(freertos_kernel_port PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
endif()
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Nova64 Core Target # Nova64 Core Target
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
+1 -1
View File
@@ -28,7 +28,7 @@ typedef struct {
} nova64_framebuffer_t; } nova64_framebuffer_t;
// Global instance access // Global instance access
NOVA64_API nova64_framebuffer_t nova64_framebuffer; NOVA64_API extern nova64_framebuffer_t nova64_framebuffer;
// Function prototypes // Function prototypes
bool nova64_framebuffer_init(void); bool nova64_framebuffer_init(void);