mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
TS1010 Logo rework for Miniware DFU (#1967)
Some checks failed
Docs / deploy-docs (push) Has been cancelled
CI / build (MHP30) (push) Has been cancelled
CI / build (Pinecil) (push) Has been cancelled
CI / build (Pinecilv2) (push) Has been cancelled
CI / build (S60) (push) Has been cancelled
CI / build (S60P) (push) Has been cancelled
CI / build (T55) (push) Has been cancelled
CI / build (TS100) (push) Has been cancelled
CI / build (TS101) (push) Has been cancelled
CI / build (TS80) (push) Has been cancelled
CI / build (TS80P) (push) Has been cancelled
CI / build_multi-lang (Pinecil) (push) Has been cancelled
CI / build_multi-lang (Pinecilv2) (push) Has been cancelled
CI / tests (push) Has been cancelled
CI / check_c-cpp (push) Has been cancelled
CI / check_python (push) Has been cancelled
CI / check_shell (push) Has been cancelled
CI / check_readme (push) Has been cancelled
CI / upload_metadata (push) Has been cancelled
Some checks failed
Docs / deploy-docs (push) Has been cancelled
CI / build (MHP30) (push) Has been cancelled
CI / build (Pinecil) (push) Has been cancelled
CI / build (Pinecilv2) (push) Has been cancelled
CI / build (S60) (push) Has been cancelled
CI / build (S60P) (push) Has been cancelled
CI / build (T55) (push) Has been cancelled
CI / build (TS100) (push) Has been cancelled
CI / build (TS101) (push) Has been cancelled
CI / build (TS80) (push) Has been cancelled
CI / build (TS80P) (push) Has been cancelled
CI / build_multi-lang (Pinecil) (push) Has been cancelled
CI / build_multi-lang (Pinecilv2) (push) Has been cancelled
CI / tests (push) Has been cancelled
CI / check_c-cpp (push) Has been cancelled
CI / check_python (push) Has been cancelled
CI / check_shell (push) Has been cancelled
CI / check_readme (push) Has been cancelled
CI / upload_metadata (push) Has been cancelled
* Move LOGO and settings to suit Miniware DFU * Update configuration.h * Adjust TS101 logo to 99K offset * Add logo note/instructions for TS101
This commit is contained in:
@@ -38,7 +38,7 @@ The model should be replaced by one of the following options:
|
||||
- `miniware` for older Miniware Irons -> TS100, TS80, TS80P
|
||||
- `pinecilv1` for the Pinecil V1
|
||||
- `pinecilv2` for the Pinecil V2
|
||||
- `ts101` for the Miniware TS101 [^1]
|
||||
- `ts101` for the Miniware TS101 [^1] [^2]
|
||||
- `s60` for the Squire S60 [^1]
|
||||
- `mhp30` for the Miniware MHP30
|
||||
|
||||
@@ -50,6 +50,28 @@ After processing its expected to have a `.hex` and `.dfu` file created to be use
|
||||
Note: make sure your image file is in the same folder as script files (img2logo.py, output_dfu.py, output_hex.py).
|
||||
|
||||
[^1] Note that these devices have larger resolution screens that the logo system supports right now. Fixes are coming for this soon, roughly scheduled for 2.23.
|
||||
[^2] The TS101 requires extra steps, see below.
|
||||
|
||||
### TS101 Quirks
|
||||
|
||||
When Miniware designed the TS101 they cut cost by using an STM32 clone with some odd quirks. They also re-wrote their USB bootloader, which has introduced new bugs for us to deal with.
|
||||
Their bootloader appears to have kept the existing limit of not being able to flash small hex files, but they no longer fall for the older "just repeat the content" trick and instead reject the file.
|
||||
Additionally, while the MCU in use has 128K of flash, their bootloader (at least for me) fails to write to anything above 99K. It _looks_ like a watchdog reset or hard crash. Unsure.
|
||||
|
||||
This has flow on effects, where the settings can still be located in the upper ~28K of flash, but it cant be used for anything we flash over USB.
|
||||
Of that 100K we can use, they waste 32K of it for their bootloader (Old bootloaders were 16K).
|
||||
This means the main "app" of IronOS is limited to around 67K (100K-32K for bootloader, -1K for logo).
|
||||
|
||||
For this device the Logo is not located at the end of flash but instead at the last writable page (99K).
|
||||
|
||||
Additionally, as we need to do a large write, to avoid having to waste more flash space; the logo is merged with the normal firmware. This means that the firmware and logo are flashed together once.
|
||||
Future updates can be done without merging as it will leave the logo data there as normal firmware doesnt touch that area of flash.
|
||||
|
||||
To do this, download the latest version of IronOS and merge it with the logo using the `--merge` command line argument.
|
||||
|
||||
To create the logo file for a TS101 the full command looks like `python3 img2logo.py <image file path> <output folder path> -m ts101 --merge <Path to main firmware>`.
|
||||
|
||||
For this reason, there are no TS101 logo's generated by the IronOS-Meta repo.
|
||||
|
||||
## Flashing the Logo
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
#define POWER_LIMIT_STEPS 5
|
||||
#define OP_AMP_GAIN_STAGE OP_AMP_GAIN_STAGE_TS100
|
||||
#define TEMP_uV_LOOKUP_HAKKO
|
||||
#define ACCEL_LIS_CLONE 1
|
||||
#define ACCEL_LIS_CLONE 1
|
||||
#define HARDWARE_MAX_WATTAGE_X10 1000
|
||||
#define TIP_THERMAL_MASS 65 // X10 watts to raise 1 deg C in 1 second
|
||||
#define TIP_RESISTANCE 75 // x10 ohms, 7.5 typical for ts100 tips
|
||||
@@ -272,7 +272,12 @@
|
||||
#endif /* TS80P */
|
||||
|
||||
#ifdef MODEL_TS101
|
||||
#define FLASH_LOGOADDR (0x08000000 + (126 * 1024))
|
||||
// For whatever reason, Miniware decided to not build a reliable DFU bootloader
|
||||
// It can't appear to flash to some of the upper pages of flash,
|
||||
// I'm slightly suspect a watchdog or something runs out
|
||||
// as device resets before file finishes copying
|
||||
// So logo has to be located on page 99 or else it cant be flashed on stock bootloader
|
||||
#define FLASH_LOGOADDR (0x08000000 + (99 * 1024))
|
||||
#define SETTINGS_START_PAGE (0x08000000 + (127 * 1024))
|
||||
#else
|
||||
#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
|
||||
|
||||
@@ -84,7 +84,8 @@ DEVICE_BSP_DIR=./Core/BSP/Miniware
|
||||
LDSCRIPT=./Core/BSP/Miniware/stm32f103.ld
|
||||
|
||||
ifeq ($(model),$(filter $(model),TS101))
|
||||
flash_size=126k
|
||||
# 128K, but logo must be at 99K so their broken ass DFU can flash it
|
||||
flash_size=98k
|
||||
bootldr_size=0x8000
|
||||
DEVICE_DFU_ADDRESS=0x08008000
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user