Commit Graph

26 Commits

Author SHA1 Message Date
Ben V. Brown
adc58ffecf Merge branch 'master' into pinecil 2020-09-17 19:07:55 +10:00
Paul Fertser
e6e0a0f280 Makefile: remove -ffat-lto-objects
"Fat" LTO objects are only needed if future linking _without_ LTO is
planned. Not using this option gives about 1.5x building time advantage
without affecting the final binary.

An unused variable is removed along the way.
2020-09-05 18:48:36 +03:00
Paul Fertser
d37f8def88 Fix FTBFS due to LTO being more sensitive to file order
When a symbol is used from inline assembly, LTO compiling and linking
process becomes more picky with regard to the order of compile/linking
units.

Specifically, when FreeRTOS/Source/portable/GCC/ARM_CM3/port.c comes
before FreeRTOS/Source/tasks.c in find results, the build fails with
undefined reference to `pxCurrentTCB' error.

To workaround the issue, do the same as we already have for
vTaskSwitchContext.

Note: different order affects resulting binary (.text section) size:
39924 with the wrong order and 39884 with the correct.

Fixes #685.
2020-09-05 18:45:40 +03:00
Paul Fertser
b331032f30 Makefile: remove duplicated code generation options from LINKER_FLAGS
LINKER_FLAGS already includes CPUFLAGS via CXXFLAGS (and that's the
right way to have the correct options defined at a single place).
2020-08-26 15:07:28 +03:00
Paul Fertser
c1dd88ba53 Allow SWD debugging when built with swd_enable=1 2020-08-26 11:54:29 +03:00
Paul Fertser
780f1f35ca Make flash and bootloader sizes configurable
This patch makes allocating special pages automatic and flexible,
allowing flash size and application start offset specification with
linker command line arguments. It should allow easier porting to
different targets and experimentation without adding code complexity.

Many original STM32F103x8 chips have fully functional 128 kiB flash and
so this additional space might come useful for experimentation,
additional optional features etc. Tested on v2.51A board, including
writing and verifying 128 kiB of random data.

Make variables are added to control that, so to build for the full
undocumented flash size and dapboot configured to start the app from 8
kiB offset one can run:

make flash_size=128k bootldr_size=0x2000
2020-08-26 11:53:47 +03:00
Ben V. Brown
3f6819287d Fix TS80P build 2020-08-18 19:31:25 +10:00
Ben V. Brown
2becaa5eab Further work on Pinecil compile 2020-08-18 18:58:00 +10:00
Ben V. Brown
3560f6c5c1 Add riscv compiler to docker image 2020-08-16 18:27:45 +10:00
Ben V. Brown
a351d60ca0 WiP makefile 2020-08-16 13:57:57 +10:00
Ben V. Brown
2fd06887e8 Better messages flowing 2020-06-16 20:21:26 +10:00
Ben V. Brown
e422fe28ae Enable -werror & wrap malloc
Preventing accidental use of dynamic memory
2020-05-30 11:39:58 +10:00
Ben V. Brown
a7a97e604f Update Makefile 2020-05-30 00:29:44 +10:00
Ben V. Brown
7dbbdf348c Update Makefile 2020-05-29 21:55:53 +10:00
Ben V. Brown
7ca613e22b Migrate :O 2019-08-18 22:24:01 +10:00
Ben V. Brown
884f22c8af All models building 2019-06-18 18:18:17 +10:00
Jakub Sztandera
c3226110f6 Enable flt-lto-objects for listing generation
I suspect that since -flto was added listing generation wasn't working.
-ffat-lto-objects allows tools like objdump to still work by including
both the internal compiler representation (for LTO) and generated code
in the .o files. It increases the compile time from 12s to 17s on my
machine but I think it is small enough cost for the benefit.

Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT
2019-05-07 04:05:23 +02:00
Jakub Sztandera
e8ee66d1c8 Use --specs=nano.specs to enable newlib-nano
Saves 1.6KiB flash.

Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT
2019-04-30 20:10:11 +02:00
Ben V. Brown
7d0af3fc4c TS80 Support Stage 1 (#365)
* Estimated pinout into the ioc file

* Fix Atollic paths to be somewhat more portable

* Add make command

* Add rough calls to ADC2 [untested]

* Using dual ADC injected modes

* Start both ADCs

* Move some IRQ's to ram exec

* Stabilize PID a bit more

* Add in ideas for tip type selection

* Update peripheral setup to support TS80

* Add tiptype formula / settings struct

* Add function ids to the settings menu

* Rough tip selection

* Rough out new cal routine for simple tips

* Hardware test is fairly close for first pass

* Add Simple calibration case [UNTESTED]

This adds the calibration option that uses boiling water to the calibration menu.

This is untested, and may need gain adjustments before use.

* [Feat] Add some QC testing code

* Typo fix

* Add double button press handler for different rising times

* Add hook for jump to sleep mode

* QC for 9V Works!

* Rough out QC handler, trim out old menu help text thats useless

* QC 9V working... Static all the things (Low on ROM)!

* Static all I2C to save space

* Move QC negotiation into background task so it doesnt block the UI

* Input V display works, tune ADC

* QC 3 steps working

* Start tip R measurements

* Impliment tip resistance

* Fix up the accel position, link in auto QC stages

* Fix tip title

* Tip type settings, Static OLED

* Revert I2C callbacks

* Misc Cleanup

* Better Gain value, need to investiate offset

* Add model warning

* Add TS80 Boot Logo (#367)

* Add TS80 Boot Logo

* Refined

* Moved down by 1px

* Add in power selection 18/24W

* Clean up accelerometer, fix TS100 builds, Fix voltage div cal
2018-10-11 14:44:56 +11:00
dogtopus
a576f44ba2 Add binary generation (#310) 2018-05-26 14:21:06 +10:00
Valmantas Palikša
fc669dc274 Use LTO to save up to 7k of flash (#305) 2018-05-18 18:54:57 +10:00
Ben V. Brown
771f0a1b9e Cleanup LCD on/off commands into buffer 2018-05-06 20:06:16 +10:00
Ben V. Brown
bf1fa74d72 Update debug info
Change pin configs
Clean up some code
2018-05-06 18:01:34 +10:00
Ben V. Brown
0d2bfb9a29 Fix Menu / RC2
#214
New Icons
Fix Hold to scroll timer with a lockout
Fix Menu lengths

New French Translation Closes #228

Fix confirmation message scroll speed
Fix translations.cpp
2018-03-14 23:21:29 +11:00
Ben V. Brown
4c0ba72542 Update Makefile and build script 2017-12-14 21:59:09 +11:00
Ben V. Brown
b2f97933fd Making rough Makefile 2017-12-13 22:07:25 +11:00