Commit Graph

114 Commits

Author SHA1 Message Date
Matthew Kennedy bc6a87cadc
allow enum_class in rusefi_hw_enums.h (#4104)
* make things c++ friendly

* install various canaries in coal mines

* using is much clearer than typedef

* fixing builds

* lps25

* trigger includes were a mess

* c -> c++ cleanup

* os util

* why did so many include os_util.h?

* fwd declare

* cypress/kinetis

* s

* eg33 happy

* happy sim

* cypress usb

* pch

* cypress

* doesn't need to include all that

* h7
2022-04-25 20:38:16 -04:00
rusefillc 25e54524e7 more copy-pasta :( 2022-02-06 22:00:49 -05:00
rusefillc 65df8adf64
407 eeprom (#3896)
* I2C EEPROM support #3860

enable

* I2C EEPROM support #3860

fresh contib

* I2C EEPROM support #3860

fresh contib

* I2C EEPROM support #3860

BL gives us extra pain

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-02-05 15:57:11 -05:00
rusefillc c61657be0f Catch up with Chibios 20.3 #2555 2022-01-15 22:09:33 -05:00
rusefillc 04ab6a0488 mk files refactoring 2022-01-06 21:48:48 -05:00
rusefillc a689f2ca0e Live Data progress
fixing build?
2022-01-06 20:16:59 -05:00
rusefillc a6040232ce reducing copy-pasta - would this work? 2022-01-04 19:28:01 -05:00
Scott Smith 1fe26f55fb
Expose console over serial port for H7 proc (#3578)
This way you can use the console/TunerStudio with the ST-Link

In the process, combine TS_PRIMARY_UART and TS_PRIMARY_SERIAL into TS_PRIMARY_PORT, to make UART vs
SERIAL selection more robus.  Ditto for TS_SECONDARY_*.  Also change use of TS_NO_PRIMARY to be #if
not #ifdef, so that it can be properly set as a compile flag and not be overwritten by various
header files.
2021-11-20 00:39:08 -05:00
Matthew Kennedy cdd27abb09
turn on c++ 20 (#3579)
* set flags

* emit initializers

* jar
2021-11-19 22:19:34 -05:00
Matthew Kennedy 8cdac4cac0
remove engine pointer passing (#3556)
* some

* more

* more

* the last?!
2021-11-16 04:15:29 -05:00
Matthew Kennedy cb032fb1ea
(void) -> () (#3550)
* static functions with (void)

* more

* Revert "more"

This reverts commit 246e53441f935451437df186ac92d7df26b62fb6.

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-15 13:02:34 +01:00
Scott Smith 37da55c920
Compile each project's PCH to a separate file to reduce developer friction. (#3505)
Having to remove the precompiled header when switching from firmware to simulator to unit_tests and
back again is annoying.  Use a directory to store the precompiled header output.  Turn off
precompiled header warnings as GCC still complains even if it finds a valid one eventually.
2021-11-08 15:52:58 -05:00
rusefillc 2a169f7d8c
Update readme.md 2021-11-05 19:53:58 -04:00
rusefillc 28edebb4a3 BL docs 2021-10-30 10:13:08 -04:00
Matthew Kennedy 428e367af5
bootloader (#3364) 2021-10-18 20:26:00 -04:00
rusefi aa914a0148 refactoring - nicer style 2021-10-08 23:14:11 -04:00
Matthew Kennedy 25414ebdad
yet more pch (#3068)
* big pch energy

* put back ramdisk stub

* tests are happy

* h743 nucleo

* kinetis

* I love deleting code!

* make stepper happy

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-08-03 22:05:01 -04:00
Matthew Kennedy b52d50bbf2
Use pch in lots of files (#3066)
* most engine.h

* most engine_configuration

* more

* more

* more

* more

* more

* moooooore

* ok I'm done for now

* oops
2021-07-26 01:05:17 -04:00
Matthew Kennedy 3518da97a7
set up precompiled header (#2971)
* ignore

* set up precompiled header

* makefile

* fixes

* cleanup

* only depend cpp on pch

* efifeatures in pch

* f7 efifeatures

* consolidate

* simulator

* proteus build

* error handling is a good one

* bootloader pch

* don't auto include pch

* dirs

* delete on clean

* bootloader cleans

* clean.sh deletes pch

* disable in bl for now

* there was a typo so maybe it'll work now

* remove todo

* don't need that any more

* don't need these parts

* don't need this part

* undo changes

* use a different cpp as example

* s

* Revert "cleanup"

This reverts commit 8de8698490f5d09c2df753f00a89751aa898be9a.

* also unnecessary now

* buh

* comment

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-25 21:23:23 -04:00
rusefillc 13c130983e Fix bootloader build #2907
helping build?
2021-07-05 15:08:11 -04:00
Andrey G b1a2295917
Fix bootloader build (#2907)
* Chibios-Contrib fix

* hm?!!

* Chibios-Contrib path is also relative to PROJECT_DIR

* Revert "Chibios-Contrib path is also relative to PROJECT_DIR"

This reverts commit 8cab5c5508df5fb57b2fe86d80589a3081cbf56c.
2021-07-05 14:18:05 -04:00
rusefillc 19e991ffd8 helping build? 2021-07-05 11:51:54 -04:00
David Holdeman 6d4060d824
Doxygen titles (#2728)
* move addRow call

* undo submo bump

* add header titles
2021-05-22 22:10:58 +03:00
Matthew Kennedy 20cef63d32
Lua on f407, try again (#2725)
* lua on f4

* move perf trace to efifeatures

* check that it's defined

* cypress and kinetis

* it would help to define the correct thing

* disable buffer if not used

* we can work with 2k

* turn off ramdisk on mre qc

* wow strncpy is useless for truncated strings

* turn off for bootloader

* lto bootloader

* memory

* memory
2021-05-20 23:05:18 +03:00
rusefillc 540bb8e327 Revert "lua on f407 (#2646)"
This reverts commit e8855263
2021-05-09 18:25:50 -04:00
Matthew Kennedy e885526308
lua on f407 (#2646)
* lua on f4

* move perf trace to efifeatures

* check that it's defined

* cypress and kinetis

* it would help to define the correct thing

* disable buffer if not used

* we can work with 2k

* turn off ramdisk on mre qc

* wow strncpy is useless for truncated strings

* turn off for bootloader

* lto bootloader
2021-05-09 16:25:38 -04:00
Matthew Kennedy 830575a306
lua 5.4 (#2590)
* thread priority

* build

* makefile prep

* call startup

* lua 5.1

* mk

* 5.3

* mk

* I guess lua does something?

* extract hooks, builds for tests

* a bit of error handling

* guard

* bootloader makefile

* remove lua

* submodule

* submodule update

* builds with submodule

* disabled by default

* h7 chconf

* tweaks

* add a useful hook

* move luaconf

* perf trace lua

* test helpers

* lua unit tests

* include to satiate clang
2021-04-28 22:41:25 -04:00
Matthew Kennedy c26987b96b
Destroy all shared logger (#2574)
* most of shared logger

* a few more

* one more

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-21 14:28:48 -04:00
Matthew Kennedy 6b64db7f9c
rewrite text logging system (#2439)
* minor cleanup

* enable mailboxes

* priority

* implement new logger

* more cleaning

* signature

* remove debug

* put the assertion back in

* remove debugging

* spelling

* doy

* tweaks & comments

* cleaning

* size_t

* guard more

* test build now

* needs more ram until we can remove LogginWithSTorage

* hunt for memory

* bootloader

* unused

* stub simulator

* it would help to get the signature right

* geez kinetis only has 64k ram

* more guarding because kinetis

* that's now very legal and very cool

* templatify

* s

* force null terminate

* probably fix

* const

* write a test

* disable sensor chart for now

* hide SC ui

* oh nope that breaks many things

This reverts commit c3c1bb324fb484c3d9cc44b7715c234bc0392e1e.

* missed one

* reset after scheduleLogging

* we can't print out the full message because it contains commas which break parsing

* force terminate long buffers

* let's see how much memory we have to play with

* a lot, is the answer

* real thread name

* shrink this for now before its deleted

* turn that back on

* biiig comment

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-18 18:46:47 -04:00
Matthew Kennedy f0cf4f38ff
fix multi-serial-port insanity (#2476)
* carve out UART specific

* implement channel

* config cleanup

* use new config

* bootloader

* dead code

* s

* h7 inherits f7

* oops

* ok now it's right

* tests

* cleanup

* call setup

* put that in its own file

* cleanup

* format

* guard

* not needed

* improve guarding

* portable

* allow override of uart mode

* fixes for bootloader

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-28 09:06:36 -04:00
Matthew Kennedy 4e3e95db2d
replace print/printMsg with scheduleMsg (#2497)
* start cleaning

* disabled feature means don't print that it's disabled

* cli

* usages

* printMsg -> scheduleMsg

* this is alllll dead now

* no crlf please

* all hope is lost if you manage to hit this line

* tests

* tests

* ok we did actually need that part

* sim

* d

* kinetis

* it did ifdef, not if

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-26 17:23:26 -04:00
Matthew Kennedy ea06358f14 more 2021-03-15 17:12:34 -04:00
Matthew Kennedy 16dfd7506f this syntax was technically illegal 2021-03-15 17:12:30 -04:00
slowriot 47da1278e0
update all compile scripts to use available cores rather than a hardcoded value (#2425)
* fix typos, spelling

* add two V8 firing orders

* use the available number of CPU cores, not just 4

* add new firing orders to config

* updating generated files to include new v8 firing orders

* reverting update of auto-generated files

* correct firing order labels for new firing orders

* update all compile scripts to use available cores rather than a hardcoded value
2021-03-06 12:55:46 -05:00
Matthew Kennedy 4fe0ceec61
deduplication in halconf (#2377)
* rusefi_halconf

* h7 gpt

* don't redefine that

* maybe this was necessary

* format

* no usb in cypress

* flags for bl

* cypress

* maybe bootloader

* no smart build for cypress/kinetis

* no smart build

* no really, disable smart build

* don't need to clean that env var

* cypress

* format
2021-02-24 14:08:03 -05:00
Matthew Kennedy bc85adc74e
start making tunerstudio more sane: part 1 (#2378)
* ts cleanup part 1

* unused unused

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-19 07:40:59 -05:00
Matthew Kennedy dade25ef34
move chconf/mcuconf/halconf in to hw_ports (#2321)
* move f4 config files

* don't need this

* f7

* f7

* h7

* this was duplicated

* turn off smart build

* loader too

* update prometheus paths

* bootloader should include confdir

* fix the flash size while we're at it

* move chconf_common

* use wait

* normalize board.mk

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-10 19:38:24 -05:00
Matthew Kennedy 423acd384b
simplify MCU selection (#2308)
* set mcu type in hw_ports

* move f4 linker script

* move f7 linker script

* don't set default linker file in makefiles

* extra line

* prometheus actually didn't depend on anything special for f469

* dead line

* h7

* dead
2021-02-08 02:11:44 -05:00
Matthew Kennedy 10c31c2955
-g3 to -g (#2256)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-01-31 14:13:55 -05:00
Andrey G 777979c3ca
Chibi os 20 (#2212)
* Update ChibiOS

* Fix Makefiles includes paths

* halconf.h: remove flash hack

* mcuconf: fix EXTI ptiorityes

* Digital Input: ICU: use designated initializers, initialize 'arr'

* ChibiOS: lis302dl fix

* ADC: update to new API

* UARTConfig: timeout_cb field, formating

* ChibiOS: remove _exit, _kill, _getpid

* Fix lis302dl

* Bump config versions

* chconfig_common: cosmetic changes

* stm32f4ems: commulative config update

* Update Simulator

* ALLCSRC already contain all needed ChibiOS files.

Same for ALLINC and ALLCPPSRC

* ChibiOS fix for Simulator

* ChibiOS: port lock/unlock hook and MMC over SPI timeout

* STM32F7: update configs

* STM32F7: update linker file

* Cypress: port ADC lld to ChibiOS-20

* Cypress: port SPI lld to ChibiOS-20

* Cypress: port CAN lld to ChibiOS-20

* Cypress: fix include path for rules.ld

* Cypress: update chconf.h and halconf.h for ChibiOS-20

* Kinetis: update ADC lld to ChibiOS-20

* Kinetis: update SPI lld to ChibiOS-20

* Kinetis: update UART lld driver for ChibiOS-20

* Kinetis: update chconf.h and halconf.h for ChibiOS-20

* Kinetis: fix include path for rules.ld

* Nucleo F746: update ld script

* Nucleo F746: fix compile

* Bootloader: fix compilation with ChibiOS-20, cleanup

* Bootloader: add way to pass crosscompiler using CROSS_COMPILE

* Debug build arguments

* Simulator: fix windows compilation

Exclude syscalls_cpp.cpp from compilation
2021-01-19 15:20:35 -05:00
rusefillc ea816c3536 DBGMCU->IDCODE 2021-01-14 23:19:54 -05:00
Matthew Kennedy bb8650179c
consolidate EFI_UNIT_TEST and friends (#1940)
* restructure

* guard c++

* idle too

* status_loop.h

* consolidate definitions

* use 1/0 instead, check for existence

* missed a few

* dead define

* defs for bootloader
2020-11-11 20:34:39 -05:00
Matthew Kennedy e0bb7ad581
disable i2c, other unused features (#1891)
* dead

* more
2020-10-20 22:24:32 -04:00
Matthew Kennedy 2083b34cf9
simplify getTimeNowNt() (#1876)
* remove old impl

* add cpp wrapper to os_access

* clean up os_access

* remove touchTimeCounter

* new impl

* put comment about lock free impl

* include cpp wrappers for BL

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-10-15 08:57:13 -04:00
rusefi 661c57c43a The Big Refactoring of 2019: folder structure #723 2020-08-02 21:04:50 -04:00
rusefi dc303d7323 bootloader not well? #1638
trying to fix error detection mechanism
2020-07-25 17:40:16 -04:00
rusefi ef36b230c2 bootloader not well? #1638
trying to fix error detection mechanism
2020-07-25 17:25:32 -04:00
rusefi 465d242347 bootloader not well? #1638
trying to fix error detection mechanism
2020-07-25 17:23:00 -04:00
Matthew Kennedy 38d3641c00
trace global lock/unlock (#1582)
* trace global lock/unlock

* bootloader stub

* add to java

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-07-10 23:27:27 -04:00
David Holdeman 779029caed
Switch to Bash (#1585)
* switch firmware to bash

* switch unit_testts to bash

* switch jenkins to bash
2020-07-09 10:27:20 -04:00