Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
74cc8fd
Input: Refactor input type checks
Ryzee119 Nov 22, 2021
11d3067
FileIO: Rework for portability
Ryzee119 Nov 22, 2021
057c5a3
Memory: Rework for portability
Ryzee119 Nov 23, 2021
cb8cc51
T4: Move HAL wrapper to Teensy folder
Ryzee119 Nov 23, 2021
4cff67c
Main: Rework for portability
Ryzee119 Nov 23, 2021
51580e6
TFT: Rework for portability. Implement GuiLite
Ryzee119 Nov 24, 2021
ae4e3b7
FileIO: Add status check function
Ryzee119 Nov 24, 2021
2b79555
HAL: Update GPIO read wrapper
Ryzee119 Nov 24, 2021
d8dd8e1
AStick: Remove Arduino header
Ryzee119 Nov 24, 2021
3fd6550
HAL: Add global interrupt functions
Ryzee119 Nov 24, 2021
5846364
Memory: Remove remaining Arduino specific code
Ryzee119 Nov 24, 2021
c27de9c
N64: Remove Arduino headers
Ryzee119 Nov 24, 2021
33b0d26
usb64: Clean up includes
Ryzee119 Nov 24, 2021
264107e
TFT: Move TFT code to src folder
Ryzee119 Nov 24, 2021
a6ffbd4
usb64: Refactor folders
Ryzee119 Nov 24, 2021
93f7238
USBH: Replace USB Stack with TinyUSB
Ryzee119 Nov 29, 2021
2cb0d7e
TinyUSB: Update submodule
Ryzee119 Nov 30, 2021
c28d52c
USBH: Add Teensy4 TinyUSB driver
Ryzee119 Nov 30, 2021
0c2f0dd
USBH: Add xinput driver
Ryzee119 Nov 30, 2021
889efd0
Input: Rework for TinyUSB backend
Ryzee119 Nov 30, 2021
8d8e608
Main: Update for new input backend
Ryzee119 Nov 30, 2021
412d21c
Build: Update CI for TinyUSB
Ryzee119 Nov 30, 2021
6709ca3
USBH: Disable debug output
Ryzee119 Nov 30, 2021
f059bff
Input: Fix warnings and remove debug messages
Ryzee119 Nov 30, 2021
0ae804a
Input: Replace ASCII defines with TinyUSB
Ryzee119 Nov 30, 2021
86a3a2f
FileIO: Return 0 on success
Ryzee119 Nov 30, 2021
f3c0501
HAL: Add milli tick wrapper
Ryzee119 Nov 30, 2021
5bc3d24
Conf: Fix printf wrapper linkage errors
Ryzee119 Nov 30, 2021
b909c3f
usb64: Fix warnings
Ryzee119 Nov 30, 2021
8068d5d
T4: Clean up includes
Ryzee119 Nov 30, 2021
ed0cd4d
usb64: Add null device
Ryzee119 Nov 30, 2021
d3750a2
TinyUSB: Update submodule
Ryzee119 Nov 30, 2021
07a91d8
n64: Use my own sprintf
Ryzee119 Nov 30, 2021
78952f0
USBH: Add HID driver stub
Ryzee119 Nov 30, 2021
c4b8ce4
Xinput: Format driver
Ryzee119 Nov 30, 2021
b4e6347
usb64: Rename port folders
Ryzee119 Nov 30, 2021
1c14859
Build: build all environments
Ryzee119 Nov 30, 2021
7ce6d18
HID: Use inbuilt hid header
Ryzee119 Nov 30, 2021
ccb412b
TFT: Rework and allow use with no framebuffer
Ryzee119 Nov 30, 2021
f7713b9
Null: Comment all functions for porting
Ryzee119 Nov 30, 2021
3b5e4cf
N64: Fix confict with stdio
Ryzee119 Nov 30, 2021
ff45ba8
Remove printf submodule
Ryzee119 Nov 30, 2021
71d00bd
Build: Link lpthread for linux test build
Ryzee119 Nov 30, 2021
6ad2d6e
Printf: Readd with mods
Ryzee119 Nov 30, 2021
2744c82
TFT: Dont set pointer twice
Ryzee119 Nov 30, 2021
c08f3e5
Main: Dont use stdio vprintf
Ryzee119 Nov 30, 2021
722d502
TinyUSB: Use my own TinyUSB fork
Ryzee119 Nov 30, 2021
a05b5cf
TinyUSB: Update submodule
Ryzee119 Nov 30, 2021
c034c76
GuiLite: Suppress warnings
Ryzee119 Nov 30, 2021
abdba10
usb64: Fix some warnings
Ryzee119 Nov 30, 2021
3bc583e
null: Add millis to HAL
Ryzee119 Dec 3, 2021
ec43308
T4: Move usb64_conf file to port fodler
Ryzee119 Dec 4, 2021
872c5b2
Main: Loop properly when not using Arduino
Ryzee119 Dec 4, 2021
de38be4
TFT: Store font on ext flash
Ryzee119 Dec 4, 2021
8dd8b98
Input: Store randnet map on ext flash
Ryzee119 Dec 4, 2021
c2c8bc7
N64: Store constant virtual mempak on ext flash
Ryzee119 Dec 4, 2021
62c2c5a
Main: Assert rumble pin for HW controller
Ryzee119 Dec 6, 2021
6ff4a9e
TFT: Refactor TFT background colour def
Ryzee119 Dec 6, 2021
12f0054
Ports: Add FLASHMEM define
Ryzee119 Dec 6, 2021
cd1c7a3
usb64: Make init functions execute from flash where possible
Ryzee119 Dec 6, 2021
ccbfb4f
N64: Bracket calc to prevent overflow
Ryzee119 Dec 6, 2021
ad699dc
usb64: Refactor GPIO for better portability
Ryzee119 Dec 7, 2021
9dd7082
null: Update backend for GPIO refactor
Ryzee119 Dec 7, 2021
4f2c600
t4: Update backend for GPIO refactor
Ryzee119 Dec 7, 2021
be1e2d7
usb64: Refactor GPIO for better portability
Ryzee119 Dec 7, 2021
8cd232d
TFT: Reset update flag after draw
Ryzee119 Dec 11, 2021
8dbfd53
TFT: Update on usb connection
Ryzee119 Dec 11, 2021
2170395
TFT: Move log generation to flush
Ryzee119 Dec 14, 2021
e6df033
usb64: Rework includes and port configuration (again)
Ryzee119 Dec 14, 2021
11e79e6
TFT: Flag update after device disconncet
Ryzee119 Dec 15, 2021
b0a0fcd
TFT: Check malloc before use
Ryzee119 Dec 15, 2021
07147d7
N64: Make CRC function weak
Ryzee119 Dec 15, 2021
b1f0dbd
TFT: Use memory malloc function
Ryzee119 Dec 16, 2021
4bd0f81
Null: Add malloc wrappers
Ryzee119 Dec 16, 2021
87c93de
T4: Add malloc wrappers
Ryzee119 Dec 16, 2021
2932025
N64: Use n64 malloc wrappers
Ryzee119 Dec 16, 2021
274c984
N64: Add malloc wrappers to header
Ryzee119 Dec 16, 2021
0ee0056
TinyUSBH: Update submodule
Ryzee119 Dec 16, 2021
60287f9
usb64: Add stm32f7 port
Ryzee119 Dec 16, 2021
35bbeb2
usb64: Update platformio.ini
Ryzee119 Dec 16, 2021
ea5f604
TFT: Use standard malloc for tft log, stop recursive logging
Ryzee119 Dec 20, 2021
a19993d
tuh: Allow multiple hubs
Ryzee119 Dec 20, 2021
9a174f8
TinyUSB: Update submodule
Ryzee119 Dec 20, 2021
039e1ae
XINPUT: Dont parse callback if error
Ryzee119 Jan 6, 2022
0ae2d91
STM32F7 USBH: Rework, multiport hubs work, more devices at once
Ryzee119 Jan 6, 2022
624d803
Tinyusb: Update submodule
Ryzee119 Jan 6, 2022
b89f648
stm32f7: Disable USB IRQ too
Ryzee119 Jan 6, 2022
17ff40f
TinyUSB: Update submodule
Ryzee119 Jan 9, 2022
dc00522
USBH: Increase enumeration buffer size
Ryzee119 Jan 9, 2022
6daaf31
stm32f7 usbh: Share control pipe, refactor functions
Ryzee119 Jan 9, 2022
ad2c32a
TinyUSB: Update submodule
Ryzee119 Jan 9, 2022
e20d6f9
Input: Correctly handle wireless 360 controllers
Ryzee119 Jan 11, 2022
398bc2f
TinyUSB: Update submodule
Ryzee119 Jan 11, 2022
7ca9286
TinyUSB: Update submodule
Ryzee119 Jan 11, 2022
582ca88
Input: Add HID mouse input driver
Ryzee119 Jan 12, 2022
419f206
Improve CI to upload dev artefacts
networkfusion Jan 15, 2022
ec8fbc0
usb64: Add stm32f769i-dk environment
Ryzee119 Jan 9, 2022
1aef689
STM32F769i: Initial commit
Ryzee119 Jan 9, 2022
1ecdec1
STM32F768i: Boots now
Ryzee119 Jan 15, 2022
9267818
STM32F768i: Support USB HS port
Ryzee119 Jan 15, 2022
0a5e605
stm32f7 usbh: Force full speed mode, properly handle transfer speeds
Ryzee119 Jan 15, 2022
fdf1652
TinyUSB: Update submodule
Ryzee119 Jan 15, 2022
d0c879f
STM32F769I: Re-add custom linker
Ryzee119 Jan 15, 2022
e4f3e8f
STM32F769I: Fix GPIO interrupts
Ryzee119 Jan 15, 2022
22646f2
STM32F769I: Disable USB HS interrupt for critical code
Ryzee119 Jan 15, 2022
bc3ecf8
STM32F769I: Clear pending interrupts before leaving
Ryzee119 Jan 15, 2022
f8eed62
STM32F769I: Use uart1 VCP for debugging over USB
Ryzee119 Jan 16, 2022
d4e4d3e
STM32: Remove main.h header
Ryzee119 Jan 16, 2022
7045f6e
N64: Add ED64 game identifier packet
Ryzee119 Jan 17, 2022
3792db9
TFT: Print current game name on TFT
Ryzee119 Jan 17, 2022
6d0b6dd
STM32F789I: Reduce SD speed
Ryzee119 Jan 17, 2022
bede1a3
STM32F7: Move common bsp port code to folder
Ryzee119 Jan 17, 2022
49f5a17
Generate hex output
networkfusion Jan 15, 2022
a4169e0
Input: Re-add RANDNET emulation
Ryzee119 Jan 19, 2022
d4b7b81
TFT: Scale output on large LCDs
Ryzee119 Jan 21, 2022
151273c
STM32FXX: Add builds to CI
networkfusion Jan 26, 2022
1c1d012
N64 :Refactor mempak title to cpak
networkfusion Jan 27, 2022
cdbfd3d
N64 :Refactor gameid detection
networkfusion Jan 27, 2022
f13a225
TFT: Improve ROM detection
networkfusion Jan 28, 2022
daa1f7b
N64: Improve Flashcart Detection
networkfusion Jan 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 35 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
push:
branches:
- master
- dev*

jobs:
build:
Expand All @@ -16,12 +17,24 @@ jobs:
BUILD_TAG: 0

runs-on: ubuntu-latest
strategy:
matrix:
board: [teensy41,disco_f769ni,disco_f750n8,template]

steps:
- name: Checkout repo
uses: actions/checkout@v1
with:
submodules: recursive

- name: Get submoduiles
run: |
git submodule init
git submodule update
# If manually get TinyUSBs submodules we need otherwise its a huge repo
cd src/lib/tinyusb
# Teensy41 Specific
git submodule init hw/mcu/nxp/mcux-sdk
git submodule update
cd ../../../

- name: Set up Python
uses: actions/setup-python@v1
Expand All @@ -34,9 +47,23 @@ jobs:
echo "BUILD_TAG=$BUILD_TAG" >> $GITHUB_ENV

- name: Compile code
run: platformio run -e teensy41
run: |
platformio platform update
platformio run -e ${{ matrix.board }}
# platformio system prune --force

- if: matrix.board != 'template'
name: Upload firmware artifact to current run
uses: actions/upload-artifact@v2
with:
name: test-firmware-${{ matrix.board }}
path: |
.pio/build/**/*.hex
# .pio/build/**/*.bin # Should not be required for any boards, and makes upload file size incorrect!
.pio/build/**/*.elf
# .pio/build/**/*.map # Currently not generated.

- if: github.event_name == 'push'
- if: github.event_name == 'push' && github.ref == 'refs/heads/master' #TODO handle previews
name: Create Release
id: create_release
uses: "actions/create-release@v1"
Expand All @@ -46,12 +73,12 @@ jobs:
draft: false
prerelease: false

- if: github.event_name == 'push'
name: Upload binary to release
- if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.board != 'template' #TODO handle previews
name: Upload binary for release
id: upload-release-asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .pio/build/teensy41/firmware.hex
asset_name: firmware-teensy41.hex
asset_path: .pio/build/${{ matrix.board }}/firmware.hex
asset_name: firmware-${{ matrix.board }}.hex
asset_content_type: application/hex
18 changes: 8 additions & 10 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
[submodule "src/printf"]
path = src/printf
url = https://github.com/mpaland/printf

[submodule "src/USBHost_t36"]
path = src/USBHost_t36
url = https://github.com/Ryzee119/USBHost_t36.git

[submodule "src/ILI9341_t3n"]
path = src/ILI9341_t3n
[submodule "src/lib/tinyusb"]
path = src/lib/tinyusb
url = https://github.com/Ryzee119/tinyusb.git
[submodule "src/teensy41/ILI9341_t3n"]
path = src/port_teensy41/ILI9341_t3n
url = https://github.com/KurtE/ILI9341_t3n.git
[submodule "src/lib/tinyalloc"]
path = src/lib/tinyalloc
url = https://github.com/thi-ng/tinyalloc.git
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Precompiled binaries can be downloaded from [Releases](https://github.com/Ryzee1
**NOTE: This project is still in development, PRs and ideas are welcome. See todo list for ideas.**

- [x] N64 controller emulation (up to four controllers at once!).
- [x] Rumblepak emulation.
- [x] Mempak emulation with four selectable banks. Technically unlimited.
- [x] Transferpak emulation. Put Gameboy ROMS on an SD Card!
- [x] Rumble Pak emulation.
- [x] Controller Pak emulation with four selectable banks. Technically unlimited.
- [x] Transfer Pak emulation. Put Gameboy ROMS on an SD Card!
- [x] N64 mouse emulation. Use a USB Mouse!
- [x] N64 Randnet emulation. Use a USB keyboard!
- [x] Configurable deadzones and sensitivity from the N64 Console.
- [x] True dual analog sticks with GoldenEye and Perfect Dark.
- [x] SD card driver with FATFS support for storage/backup of Gameboy ROMS, mempaks etc.
- [x] SD card driver with FATFS support for storage/backup of Gameboy ROMS, controller paks etc.
- [x] A single hardwired controller interface for ultimate hacking.
- [x] Optional TFT LCD Support.

Expand All @@ -36,10 +36,10 @@ Precompiled binaries can be downloaded from [Releases](https://github.com/Ryzee1
- A hardwired controller, use your own buttons etc.

## Controls
- Back + D-Pad = Insert Mempak banks 1 to 4
- Back + D-Pad = Insert Controller Pak banks 0 to 3
- Back + LB = Insert Rumblepak
- Back + RB = Insert Transferpak
- Back + Start = Select *virtual pak* (Use in-game mempak managers to configure the device)
- Back + Start = Select *virtual pak* (Use in-game Controller Pak managers to configure the device)
- Back + B = Switch to true dual-analog stick more for GoldenEye 007/Perfect Dark
- Back + A = Backup buffered memory to SD Card **(DO THIS BEFORE POWER OFF!)**

Expand Down
22 changes: 11 additions & 11 deletions USAGE.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
# Usage
* [Mempaks](#mempaks)
* [Rumblepaks](#rumblepaks)
* [Transferpaks](#transferpaks)
* [Virtualpak](#virtualpak)
* [Controller Paks](#controller-paks)
* [Rumble Paks](#rumble-paks)
* [Transfer Paks](#transfer-paks)
* [Virtual Pak](#virtual-pak)
* [Dual Stick Mode](#dual-stick-mode)
* [N64 Mouse](#n64-mouse)
* [TFT LCD Display](#tft-lcd-display)
* [Debug](#debug)

## Mempaks
## Controller Paks
* usb64 can simulate four Mempaks simultaneously. To select a Mempak press `BACK+D-PAD` direction to select the respective bank.
* Two controllers cannot have the same bank selected. The second controller will revert to a Rumblepak.
* Do not unplug the usb64's power before turning off the n64 console to prevent data loss. The usb64 senses the n64 console turning off and flushes data to the SD Card.
* Inserting the SD card into your PC will show Mempaks as `MEMPAKXX.MPK` where XX is the bank number. You can back these up to your PC.

## Rumblepaks
## Rumble Paks
* usb64 can simulate four Rumblepaks simultaneously. Rumblepaks are the default peripheral on power up. To select a Rumblepak press `BACK+LB`.
* The usb controller must support force feedback.

## Transferpaks
## Transfer Paks
* usb64 can simulate four transferpaks simulateneously. The select a Transferpak press `BACK+RB`. The transferpak will attempt to load the previously set Gameboy or Gameboy Colour ROM from the SD Card.
* To select the ROM to load, you must first use the [*VirtualPak*](#virtualpak). If a ROM isn't selected, or fails to load, it will revert to a Rumblepak.
* Avoid having two controllers access the same ROM at once.
* Do not unplug the usb64's power before turning off the n64 console to prevent data loss. The usb64 senses the n64 console turning off and flushes data to the SD Card.
* Gameboy saves can be copied over to the SD Card for use with the Transferpak. The file name must match the ROM save with a `.SAV` extension.
* You can simulate four transferpaks, with four difference ROMS, with four different save files! <p align="center"><img src="./images/tpak_6.png" alt="tpak_6" width="35%"/> <img src="./images/tpak_7.png" alt="tpak_7" width="35%"/></p> <p align="center"><img src="./images/silver.gif" alt="silver" width="35%"/> <img src="./images/tpak_1.png" alt="tpak_1" width="35%"/></p> <p align="center"><img src="./images/tpak_5.png" alt="tpak_5" width="35%"/> <img src="./images/tpak_8.png" alt="tpak_8" width="35%"/></p>

## Virtualpak
* The Virtualpak is one of my favourite features. It's like a Mempak, but is not used for save files. It exploits the Mempak managers built into some N64 games to configure the usb64 device!
## Virtual Pak
* The VirtualCpak is one of my favourite features. It's like a Controller Pak, but is not used for save files. It exploits the Mempak managers built into some N64 games to configure the usb64 device!
* To select the Virtualpak press `BACK+START`.
* To use the Virtualpak, boot into a game that has a Mempak manager. Some games will work better than others. `Army Men: Air Combat` is a good one. `Perfect Dark` works well too. Hold START whilst the game is booting to access the Mempak manager. The follow screens show `Army Men: Air Combat` and `Perfect Dark` as an example. <p align="center"><img src="./images/vp_main.png" alt="vp_main" width="35%"/> <img src="./images/vp_perfectdark.png" alt="vp_perfectdark" width="35%"/></p>
* To select an item, you actually delete that note from the Mempak. usb64 detects what row you selected as if navigating a menu!
* To use the Virtualpak, boot into a game that has a Contrroller Pak manager. Some games will work better than others. `Army Men: Air Combat` is a good one. `Perfect Dark` works well too. Hold START whilst the game is booting to access the Controller Pak manager. The follow screens show `Army Men: Air Combat` and `Perfect Dark` as an example. <p align="center"><img src="./images/vp_main.png" alt="vp_main" width="35%"/> <img src="./images/vp_perfectdark.png" alt="vp_perfectdark" width="35%"/></p>
* To select an item, you actually delete that note from the Controller Pak. usb64 detects what row you selected as if navigating a menu!
* **TPAK SETTINGS** is used to configure what ROM to load into the Transferpak. This will scan the SD card for files with `.gb` and `.gbc` extensions. A `*` will print next to the currently set ROM. You can have up to ten ROMs on the SD card. After this they will just get ignored. <p align="center"><img src="./images/vp_tpak.png" alt="vp_tpak" width="35%"/></p>
* **CONT SETTINGS** is used to configure the controller. You can change deadzone, Sensitivity, toggle on/off snapping to 45deg angles and toggle on/off a octagonal N64 stick correction. The set values is shown as a number next to the row. Each controller can be configured individually. Note: Some controllers will have deadzones or 45 degree angle snapping built in. For these, usb64 can't disable it. <p align="center"><img src="./images/vp_cont.png" alt="vp_cont" width="35%"/></p>
* **USB64 INFO1** shows what controller is connected to that port. <p align="center"><img src="./images/vp_info1.png" alt="vp_info1" width="35%"/></p>
Expand Down
44 changes: 44 additions & 0 deletions boards/disco_f750n8_extflash.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"build": {
"cpu": "cortex-m7",
"extra_flags": "-DSTM32F750xx",
"f_cpu": "216000000L",
"mcu": "stm32f750n8h6",
"product_line": "STM32F750xx"
},
"connectivity": [
"can",
"ethernet"
],
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32F750N8",
"onboard_tools": [
"stlink"
],
"openocd_board": "stm32f7discovery",
"openocd_target": "stm32f7x",
"svd_path": "STM32F750x.svd"
},
"frameworks": [
"cmsis",
"stm32cube",
"libopencm3"
],
"name": "STM32F7508-DK",
"upload": {
"maximum_ram_size": 327680,
"maximum_size": 16777216,
"protocol": "stlink",
"protocols": [
"jlink",
"cmsis-dap",
"stlink",
"blackmagic"
]
},
"url": "https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-discovery-kits/stm32f7508-dk.html",
"vendor": "ST"
}
10 changes: 10 additions & 0 deletions hex_from_elf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Import("env")

# Custom HEX from ELF
env.AddPostAction(
"$BUILD_DIR/${PROGNAME}.elf",
env.VerboseAction(" ".join([
"$OBJCOPY", "-O", "ihex", "-R", ".eeprom",
"$BUILD_DIR/${PROGNAME}.elf", "$BUILD_DIR/${PROGNAME}.hex"
]), "Building $BUILD_DIR/${PROGNAME}.hex")
)
137 changes: 119 additions & 18 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,37 @@
src_filter =
+<*.cpp> +<*.c>
+<n64/*.c>
+<printf/*.c>
+<tinyalloc/*.c>
+<lib/*.c>
+<lib/printf/*.c>
+<lib/tinyalloc/*.c>
+<tft/*.cpp>

+<lib/tinyusb/src/*.c>
+<lib/tinyusb/src/common/*.c>
+<lib/tinyusb/src/host/*.c>
+<lib/tinyusb/src/class/hid/*.c>

build_flags =
-O2
-Wall
-Isrc/
-Isrc
-Isrc/n64
-Isrc/printf
-Isrc/tinyalloc
-Isrc/tft
-Isrc/lib
-Isrc/lib/printf
-Isrc/lib/tinyalloc
-Isrc/lib/tinyusb/src
;DEBUG OUTPUT CONFIG
-DDEBUG_STATUS=1 ;General information
-DDEBUG_N64=0 ;For debugging N64 low level info
-DDEBUG_TPAK=0 ;For debugging N64 TPAK low level info. It's complex so has its own flag
-DDEBUG_USBHOST=0 ;For debugging the USB Host Stack (1,2 or 3. Higher = more output)
-DDEBUG_MEMORY=0 ;For debugging the memory allocator in external RAM.
-DDEBUG_FATFS=0 ;For debugging the FATFS io
-DDEBUG_ERROR=1 ;For showing critical errors

-DCFG_TUSB_DEBUG_PRINTF="tusb_printf_hook"
-DCFG_TUSB_DEBUG=DEBUG_USBHOST

; Printf Configuration
-DPRINTF_DISABLE_SUPPORT_FLOAT
Expand All @@ -49,23 +70,103 @@ build_flags =
platform = teensy@~4.13.1
board = teensy41
framework = arduino
monitor_port = COM25
monitor_speed = 256000

; Disable the inbuilt framework lib so I can use my own fork
lib_ignore = USBHost_t36
src_filter =
${common_env_data.src_filter}
+<port_teensy41/ILI9341_t3n/src/*.cpp>
+<port_teensy41/ILI9341_t3n/src/*.c>
+<port_teensy41/*.cpp>
+<port_teensy41/*.c>
;TinyUSB (T4 specific)
+<lib/tinyusb/hw/mcu/nxp/mcux-sdk/devices/MIMXRT1062/*.c>
+<lib/tinyusb/src/portable/nxp/transdimension/*.c>
+<lib/tinyusb/src/portable/ehci/*.c>

build_flags =
${common_env_data.build_flags}
-Isrc/port_teensy41/
-Isrc/port_teensy41/ILI9341_t3n/src
;TinyUSB (T4 specific)
-Isrc/lib/tinyusb/hw/mcu/nxp/mcux-sdk/CMSIS/Include
-Isrc/lib/tinyusb/hw/mcu/nxp/mcux-sdk/devices/MIMXRT1062
-Isrc/lib/tinyusb/hw/mcu/nxp/mcux-sdk/devices/MIMXRT1062/drivers
-Isrc/lib/tinyusb/hw/mcu/nxp/mcux-sdk/drivers/common
-DCPU_MIMXRT1062DVL6A
-DCFG_TUSB_MCU=OPT_MCU_MIMXRT10XX
-DMCU_VARIANT=MIMXRT1062

[env:disco_f750n8]
platform = ststm32
board = disco_f750n8_extflash
framework = stm32cube
; This board has hardly any internal flash. My code is booted from the QSPI external flash.
; This custom linker will copy all code to RAM after boot for noticably better performance.
; I also created code/data areas for flash when I want functions/data to remain on flash to save RAM.
board_build.ldscript = src/port_stm32f7/stm37f750-dk/STM32F750N8HX_EXTFLASH.ld

src_filter =
${common_env_data.src_filter}
+<USBHost_t36/*.cpp>
+<ILI9341_t3n/src/*.cpp>
+<ILI9341_t3n/src/*.c>
+<tft/*.cpp>
+<port_stm32f7/common/*.c>
+<port_stm32f7/common/fatfs/*.c>
+<port_stm32f7/common/fatfs/option/*.c>
+<port_stm32f7/common/fatfs/drivers/*.c>
+<port_stm32f7/common/bsp_common/*.cpp>
+<port_stm32f7/common/bsp_drivers/STM32F7508-Discovery/*.c>
+<port_stm32f7/stm37f750-dk/*.cpp>

build_flags =
${common_env_data.build_flags}
-Isrc/USBHost_t36
-Isrc/ILI9341_t3n/src
-Isrc/tft
; -DUSBHOST_PRINT_DEBUG
; -DDEBUG_JOYSTICK
-Isrc/port_stm32f7/stm37f750-dk
-Isrc/port_stm32f7/common/fatfs
-Isrc/port_stm32f7/common/fatfs/drivers
-Isrc/port_stm32f7/common/bsp_drivers/STM32F7508-Discovery
-DCFG_TUSB_MCU=OPT_MCU_STM32F7
-DAPPLICATION_ADDRESS=0x90000000U ;My entry point is in QSPI Flash for this board
-DUSE_HAL_DRIVER
-DSTM32F750xx
-DUSB_USB_FS

[env:disco_f769ni]
platform = ststm32
board = disco_f769ni
framework = stm32cube
extra_scripts = post:hex_from_elf.py
board_build.ldscript = src/port_stm32f7/stm37f769-dk/STM32F769NIHX_FLASH.ld

src_filter =
${common_env_data.src_filter}
+<port_stm32f7/common/*.c>
+<port_stm32f7/common/fatfs/*.c>
+<port_stm32f7/common/fatfs/option/*.c>
+<port_stm32f7/common/fatfs/drivers/*.c>
+<port_stm32f7/common/bsp_common/*.cpp>
+<port_stm32f7/common/bsp_drivers/STM32F769I-Discovery/*.c>
+<port_stm32f7/common/bsp_drivers/Components/otm8009a/otm8009a.c>
+<port_stm32f7/stm37f769-dk/*.cpp>

build_flags =
${common_env_data.build_flags}
-Isrc/port_stm32f7/stm37f769-dk
-Isrc/port_stm32f7/common/fatfs
-Isrc/port_stm32f7/common/fatfs/drivers
-Isrc/port_stm32f7/common/bsp_drivers/STM32F769I-Discovery
-DCFG_TUSB_MCU=OPT_MCU_STM32F7
-DAPPLICATION_ADDRESS=0x8000000U ;Entry point is internal FLASH.
-DUSE_HAL_DRIVER
-DSTM32F769xx
-DUSB_USB_HS

[env:template]
platform = native

src_filter =
${common_env_data.src_filter}
+<port_template/*.cpp>
+<port_template/*.c>
+<lib/tinyusb/src/portable/template/*.c>

build_flags =
${common_env_data.build_flags}
-Isrc/port_template/
-DCFG_TUSB_MCU=OPT_MCU_NONE
-lpthread
1 change: 0 additions & 1 deletion src/ILI9341_t3n
Submodule ILI9341_t3n deleted from bb3072
1 change: 0 additions & 1 deletion src/USBHost_t36
Submodule USBHost_t36 deleted from 637c4c
Loading