Commit Graph

58 Commits

Author SHA1 Message Date
Matthew Kennedy 6788ef837d fix no-lua build (#4690) 2022-10-20 22:01:33 -04:00
Andrey 2d4b944547 test coverage and some magic constant refactoring 2022-08-21 15:22:22 -04:00
Matthew Kennedy efdae2322d Start -> start (#4366) 2022-07-21 15:17:32 -04:00
rusefillc 9e8bfe92d8 #4308 progress 2022-07-14 12:36:55 -04:00
Matthew Kennedy 16a39badff Error handling cleanup (#4332)
* dead code in stm32

* rusefi.cpp can have some noreturn

* handle lua panic

* unused error codes

* simplifications of error_handling.cpp

* comment

* put that back

* guard
2022-07-07 23:49:02 -04:00
rusefillc 129e4df5bf Uniform reset pattern for all Lua adjustments #4308
no progress only preparation
2022-06-30 20:07:27 -04:00
Matthew Kennedy 1dfd3359df remove system lua VM (#3864)
* well, that was a fun experiment

* don't need that file

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2022-06-29 16:52:17 -04:00
Matthew Kennedy b87eea0a15 use the right define (#4184) 2022-05-19 09:46:49 -04:00
rusefillc cd318aa935 Hellen wants Lua RAM 2022-05-18 23:14:48 -04:00
rusefillc 101a7eb719 Air Conditioning Improvements #4054 2022-04-08 21:28:50 -04:00
rusefillc 3d8c40da58 We have working runtime RAM detection - we shall use it for Lua #3970 2022-03-27 19:39:41 -04:00
rusefillc fd1fb0fcef Revert "lua: TDD of enabling base lib"
This reverts commit ec97bf2cb5.
2022-02-22 20:50:38 -05:00
rusefillc 77bccebd2b Revert "lua: enabling string lib"
This reverts commit a0d3942c29.
2022-02-22 20:50:38 -05:00
rusefillc a0d3942c29 lua: enabling string lib 2022-02-22 17:31:44 -05:00
rusefillc ec97bf2cb5 lua: TDD of enabling base lib 2022-02-22 16:25:41 -05:00
rusefi 7bc130200d Lua CAN relay performance #3911 2022-02-13 00:07:36 -05:00
rusefillc 9ce3f14137 Lua CAN relay performance #3911 2022-02-10 21:01:15 -05:00
rusefillc 86c8dcf011 random piece of https://github.com/dron0gus/rusefi/tree/f429-discovery-ram-dev 2022-01-09 22:42:24 -05:00
Andrey d2c46b3310 Let's always have TS structure so that unit tests can check values in outputChannels, kind of making outputChannels a god dump for state but whatever since Live View is coming 2021-12-07 20:18:47 -05:00
rusefillc c01192acf6 proteus to have enlarged Lua
one step back
2021-11-30 22:35:29 -05:00
Matthew Kennedy dc7fe111bf strtof (#3623)
* strtof

* do fewer divides
2021-11-26 18:39:45 -05:00
Scott Smith 467db16828 Move LuaThread to CCM, and shuffle a couple items out. (#3587)
Lua's stack probably doesn't need DMA.  Allows us to group more of our unused RAM together
in one place.
2021-11-21 20:35:03 -05:00
Matthew Kennedy 569415930c detect more overflows with asan (#3582)
* overflow detector

* type list dynamic allocate

* fix the buffer length

* comment

* pr fb

* sanitize sim

* fix sim sanitizer bug

* didn't mean to turn off optimization for sim

* asan can do that, if you turn it on!

* cleaning
2021-11-20 01:38:39 -05:00
Scott Smith 80091498a6 Programmatically replace ENGINE() and CONFIG() with engine-> etc (#3565)
git grep -l -w ENGINE | xargs sed -i -r "s/ENGINE\(([]a-zA-Z_0-9.[]+)\)/engine->\1/g"

git grep -l -w CONFIG | xargs sed -i -r "s/([^a-zA-Z_])CONFIG\(([]a-zA-Z_0-9.[]+)\)/\1engineConfiguration->\2/g"
2021-11-17 03:54:21 -05:00
Matthew Kennedy 569ec1013b update luaaa (#3540)
* lua update

* no stdlib mode

* turn off system luaaa for now since it makes luaaa sad

* let user heap do a little

* gitmodules

* memory shuffling

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-12 22:10:05 -05:00
Matthew Kennedy baf11a27b9 load lua libs correctly (#3529)
* fix lua lib loading

* test
2021-11-11 13:44:13 -05:00
Matthew Kennedy e7d66fd242 Lua CAN RX (#3403)
* wiring

* static

* implementation

* comment

* unit tests happy

* guard

* guard smarter, not harder

* guard smarter not harder

* guard even smarter, not even harder

* don't need that
2021-10-24 08:37:04 -04:00
Matthew Kennedy 0419e3489a per-MCU lua size (#3339)
* per-MCU lua size

* simulator happy
2021-10-09 09:02:30 -04:00
rusefi 67e7a1b6cf looks like a typo 2021-10-08 23:14:11 -04:00
rusefi ca7304131b luamemory does same but better 2021-10-08 14:48:16 -04:00
rusefillc 0cc58432c7 "luastats" command 2021-09-29 21:04:50 -04:00
Matthew Kennedy bbe564560b lua hook for timing add (#3260)
* load script

* test

* needs more rams

* embiggen stack

* init system lua from lua thread

* de-embiggen stack

* infra

* hook

* system needs a little more

* semicolon

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-09-23 23:50:47 -04:00
Matthew Kennedy 4416b35820 system lua: load a script! (#3231)
* load script

* test

* needs more rams

* embiggen stack

* init system lua from lua thread

* de-embiggen stack

* system needs a little more

* memory

* om nom nom delicious memory

* how much more memory could it want

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-09-23 21:45:14 -04:00
rusefillc 3cacebd22d let's throw gas at the problem! 2021-09-18 17:48:01 -04:00
rusefillc aab05cec65 refactoring 2021-09-18 17:44:55 -04:00
Matthew Kennedy 98c4e71f03 enable address sanitizer (#3217)
* enable asan

* lua

* this is dead and leaky

* leaky nissan

* fix pwm generator use-after-stack

* initializers

* prevent problems in case of invalid trigger shape

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-09-05 05:56:59 -04:00
Matthew Kennedy 36d2c29667 start system lua VM (#3219)
* start system lua vm

* show used

* message

* null if script load fails
2021-09-04 07:57:58 -04:00
Matthew Kennedy eeef1148d8 multiple lua heaps (#3215)
* multi lua heaps

* assert

* put it in a class

* put it in the class

* privacy
2021-09-03 03:45:23 -04:00
Matthew Kennedy ec242f92de lua pass alloc and script (#3179)
* pass alloc and script

* pass in all the spots
2021-08-19 15:14:02 -04:00
Matthew Kennedy a02c8dc7c3 lua & fsio cleanup (#3175) 2021-08-18 15:25:46 -04:00
Matthew Kennedy 39388c75d8 even more pch (#3112)
* s

* more

* s

* f7
2021-08-04 19:30:52 -04:00
Matthew Kennedy d3ec2b21d1 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 e3849b95d5 don't require EXTERN_ENGINE in every file (#2969)
* move enginePins

* no more extern engine

* uses

* more

* extern config too

* put this where it belongs

* include correct header

* merge
2021-07-16 18:13:33 -04:00
Matthew Kennedy 45d185b09d lua hooks for CAN tx (#2967)
* CanTxMessage usable from unit test

* testLuaReturnsNil

* CAN hook and tests

* it helps if parameter names exist

* nameless params

* s

* redefinition of default argument

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-16 14:06:26 -04:00
Matthew Kennedy 6b93647c5f deinit lua pins when not used (#2876)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-06-28 08:39:03 -04:00
Matthew Kennedy c7cc5471ad 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
Matthew Kennedy 6d9c0299fb Lua script editor in console (#2699)
* stub

* implement reset

* console

* just use the console command

* cleanup

* s

* s

* ui

* write in chunks

* fix write

* tab size, script read

* parse script properly

* put lua script in flash, tiny for now

* generated fields
2021-05-18 20:58:39 +03:00
Matthew Kennedy 4b0d75ff92 make the simulator usable (#2717)
* these start themselves now

* dead

* configure ports

* start serial

* dead

* minimal pins

* simulator logging works

* why not enable lua

* speeeeeed

* start lua

* spammy print
2021-05-17 12:44:02 +03:00
Matthew Kennedy 4b6d1e0283 add ability to reset Lua interpreter (#2695)
* stub

* implement reset

* console

* just use the console command

* cleanup

* s

* s

* fix memory tracking
2021-05-14 16:20:27 -04:00
Matthew Kennedy 61b0e85e0a don't lowercase console commands (#2664)
* don't lowercase commands

* print bool lua results

* lua memory command
2021-05-10 11:30:50 -04:00