Commit Graph

164 Commits

Author SHA1 Message Date
rusefi a2c1e74f56 refactoring: explicit folder for FatFS
Windows :(
2022-08-24 14:48:42 -04:00
rusefi c32e826fea refactoring: explicit folder for FatFS 2022-08-24 13:55:21 -04:00
Matthew Kennedy 5fc7000834 Pt2001 module (#4396)
* pt2001 uses module

* read flag0

* c

* libfirmware

* makefiles

* are unit tests happy?

* bootloader
2022-08-08 08:53:08 -04:00
rusefillc 38cc34acf8 https://rusefi.com/forum/viewtopic.php?p=45952#p45952 (#4400)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-29 17:35:05 +03:00
Andrey G 4a4443a27d Add "Reset to OpenBLT" button (#4364)
Similar to "Reset to DFU", but uses different seed
2022-07-22 08:21:11 +03:00
Matthew Kennedy cd98ad35c2 use libfirmware for a few things (#4351)
* use libfirmware

* unit tests

* crc

* missed one

* bootloader
2022-07-16 02:22:51 -04:00
Matthew Kennedy cbdfb7ac5c Write hard faults to backup ram, print on next boot (#4324)
* use backup ram, hard fault handler improvement

* wire it up

* upload elf

* s

* I guess I'll just use strncpy

* s

* what is it even complaining about?

* neat, we don't need a cast

* cypress and kinetis

* cleanup

* ci

* guard for tests
2022-07-07 15:14:31 -04:00
rusefillc 6a077a632a console uses .hex Looks like I broke MRE and Proteus with OpenBLT #4199
steps towards proper script in HW CI
2022-05-25 10:44:34 -04:00
rusefillc 1ade9c4394 promoting openblt to it's own folder 2022-05-24 15:23:55 -04:00
Matthew Kennedy 56240cb668 we have other places to set these MCU values (#3875)
* we have other places to set these values

* missing parts

Co-authored-by: rusefillc <rusefillc@gmail.com>
2022-02-01 18:18:16 -05:00
rusefillc 31095454c4 Catch up with Chibios 20.3 #2555 2022-01-15 21:13:37 -05:00
rusefillc d447e34344 mk files refactoring 2022-01-06 21:48:48 -05:00
rusefillc 4250d330d0 mk files refactoring
saving build
2022-01-06 20:52:49 -05:00
rusefillc 47f0423b73 mk files refactoring 2022-01-06 20:32:39 -05:00
rusefillc 1955c5a3c2 mk files refactoring 2022-01-06 20:06:31 -05:00
rusefillc 433ff5c62e Live Data progress 2022-01-06 19:02:35 -05:00
rusefillc c596aa2b78 reducing copy-pasta - would this work? 2022-01-04 19:56:36 -05:00
rusefillc 18cd02a1d6 reducing copy-pasta - would this work? 2022-01-04 18:50:25 -05:00
Andrey G 72d53082bb GCC-10 and C++ 2a: supress depricated volatile use errors (#3711) 2021-12-21 14:38:49 -05:00
Andrey G 3a2dbdc1a8 Do compiler check first (#3706) 2021-12-20 16:17:53 -05:00
Matthew Kennedy a79b0c424c turn on c++ 20 (#3579)
* set flags

* emit initializers

* jar
2021-11-19 22:19:34 -05:00
Scott Smith 7843b5a28d Print BSS and RAM4 totals at the end of make. (#3527)
If java is unable to run, don't error out the Makefile, just complain a little and move on.  Until
the gcc_map_reader actually works with RAM4, we print it manually.
2021-11-11 11:51:35 -05:00
Scott Smith 7367aa5b8a 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
Andrey G 51f53aa3fc Openblt (#3430)
* Makefile: define BOOTLOADER=1 for linker in case of OpenBLT too

This will reserve first 32K of flash for bootloader.

* OpenBLT: include into build

* board: subaru eg33: add OpenBLT board code

* board: subaru eg33: use OpenBLT

* Board: Subaru EG33: OpenBLT: reuse HAL and CMSIS from OpenBLT submodule

* Board: Subaru EG33: OpenBLT: reuse linker file from OpenBLT too

* OpenBLT for MRE

* OpenBLT: MRE: adjust LD memory map for smallest variat of MCU on MRE

* OpenBLT: enable for MRE

* OpenBLT: disable CRC check of user application

This allows us to use DFU tool to flash main application too.

* hex2dfu: fresh binary for linux

* OpenBLT: extract common part of OpenBLT makefiles to openblt.mk

* OpenBLT: enable CRC check of user application for MRE and EG33

CRC (actually just a summ) of few first vectors is stored at 0x1c
offset. This is reserved vector for Cortex-M3, M4 and M7

* common_make: append OpenBLT CRC to dfu files

This should allow to use DFU to do main application update when
when OpenBLT is used as bootloader. hex2dfu will store same
styled CRC as OpenBLT expects to see in user app.

* OpenBLT reorganization

Move common stuff to hw_layer/ports/

* OpenBLT: proteus

* Proteus: enable OpenBLT for F4 and F7

Compilation tested only
2021-11-05 19:28:55 -04:00
Andrey G 37132db63e Prepare for openblt (#3445)
* Makefile: create and deliver srec file too

srec is used by OpenBLT tools

* Simplify common_make.sh
2021-11-02 07:41:41 -04:00
Andrey 29851fe219 export board-specific macro for stm32 pins based on board yaml #3298
meta progress
2021-10-26 10:27:10 -04:00
Matthew Kennedy 208497e6ed ethernet (#3342)
* checksum offload

* ethernet console

* guard flag

* flags

* reserve pins

* f4

* ip and link options

* chibios

* conditional build lwip

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-10-10 01:15:49 -04:00
Andrey G 859c4f3902 Settings ext storage (#3155)
* flash_main.cpp: reorder code for easy integration of ext storage

* Add EFI_STORAGE_INT_FLASH option

Default set to TRUE

* Add ChibiOS's Managed Flash Storage to build

* Add support for QSPI flash (SST26F064A tested)

* board: subaru: enable WSPI and NOR flash drivers

* Add option to save settings on ext flash MFS partition

* board: subaru: store settings on QSPI NOR flash
2021-08-14 09:36:08 -04:00
Matthew Kennedy f44a84b40c 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
rusefi 038990b288 docs 2021-07-09 13:29:03 -04:00
Andrey G d508537374 Chibios-Contrib for stm32 (#2903)
* Add Chibios-Contrib for STM32F/H too

* ports: stm32: add community hal and cmu configs for STM32

* ports: stm32: community: disable CRC driver
2021-07-05 09:53:45 -04:00
Matthew Kennedy 6bfaed64db lua pwm hooks (#2687)
* pwm hook

* dedicated pins

* write hook

* UI

* more info

* zero based, clamp

* memory

* don't compile lua in bootloader at all
2021-05-20 19:01:17 -04:00
Andrey G 0faa8a0166 Hw layer rearrangement (#2705)
* Fix simulator compilation

* HW_SENSORS_SRC -> HW_SENSORS_CPP
2021-05-16 14:11:28 +03:00
rusefillc f72db1df9d same line twice 2021-05-07 22:03:28 -04:00
Matthew Kennedy addf97ee08 prep for lua (#2589)
* thread priority

* build

* makefile prep

* call startup

* s
2021-04-27 07:57:08 -04:00
Matthew Kennedy 8edb115113 Embed ini (#2417)
* replace null device with rusefi ini

* comment

* warning

* stub ramdisk for when we don' thave an image

* maybe generate the image with a build

* install mtools

* fail on error

* install deps _before_ we need them

* embed a little readme

* oops
2021-03-03 07:50:53 -05:00
Matthew Kennedy f9536791f0 set MCU properly (#2371) 2021-02-17 15:25:57 -05:00
Matthew Kennedy e3dadd3d51 implement null block device (#2341)
* implement null device

* fix build
2021-02-13 08:53:10 -05:00
Matthew Kennedy adff68748c 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 c0757a7d13 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
rusefillc 1c51e06e35 let's build for h7 2021-02-05 20:58:34 -05:00
Matthew Kennedy e22a9e9d02 -g3 to -g (#2256)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-01-31 14:13:55 -05:00
Andrey G 27905c6817 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
Andrey G d134fabc51 Simplify Makefile, unify board.mk files (#2229)
* Proper way to add lis302 driver

* Proper way to add license directory to includes

* Makefile: simplify

All ChibiOS stuff is accumulated in ALLCSRC, ALLINC and so on.

* board.mk: append sources and includes to ALLSRC, ALLCPPSRC, ALLINC

* Cypress: fix CANv2 includence into build
2021-01-17 09:32:06 -05:00
Matthew Kennedy 6b0c533d2c 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 554304dac3 switch to single precision constants (#1880)
* adjust builds

* fix test
2020-10-14 20:04:35 -04:00
rusefi 566b246efb Hellen says merge #1772 2020-09-26 04:13:02 -04:00
rusefi 7fa7ac6c37 Merge remote-tracking branch 'origin/Hellen_fork_point' into master
# Conflicts:
#	firmware/Makefile
#	firmware/hw_layer/smart_gpio.cpp
2020-09-09 17:19:41 -04:00
rusefi 2cbb1c4427 Hellen says merge #1772 smart build by default 2020-09-09 16:53:54 -04:00
rusefi 9a33e922af The Big Refactoring of 2019: folder structure #723 2020-08-02 20:46:40 -04:00