1
0
mirror of https://github.com/elua/elua.git synced 2025-01-25 01:02:54 +08:00

1448 Commits

Author SHA1 Message Date
Bogdan Marinescu
251f48fcf9 Adding CircleCI tests 2018-05-19 16:43:54 +03:00
Bogdan Marinescu
ce71c23369
Merge pull request #125 from elua/fixes
Fixes
2018-05-19 01:15:17 +03:00
Bogdan Marinescu
a1e6770123 Always create build directory for cross compiler 2018-05-19 00:54:56 +03:00
Bogdan Marinescu
9074c4c6f2 Multiple fixes
- Use the proper suffix in Windows for cross-compilation
- Add a boolean attribute type
- Increased number of virtual UARTs
- Updated README.asciidoc with more information on how to cross-compile
  in Windows
2018-05-18 23:47:20 +03:00
Bogdan Marinescu
a2ee91a089 Revert "Updated .config location for sim in the docs"
This reverts commit bf1d0b03cbb8983167912fc052dac5f295e512e1.
2018-04-27 00:53:36 +03:00
Bogdan Marinescu
bf1d0b03cb Updated .config location for sim in the docs 2018-04-27 00:43:47 +03:00
Bogdan Marinescu
cb892d1e0c
Merge pull request #123 from elua/sim_updates
Sim updates
2018-04-27 00:40:43 +03:00
Bogdan Marinescu
3e2e26892c SImulator documentation
Added documentation on how to build and run the simulator.
2018-04-27 00:39:26 +03:00
Bogdan Marinescu
a539f8fe62 Updates to the eLua simulator
This PR updates the Linux version of eLua (aka "the simulator") to
compile with a more recent toolchain. The changes shouldn't affect the
other eLua targets.
2018-04-27 00:38:19 +03:00
Bogdan Marinescu
f1638eb19f
Merge pull request #122 from elua/fix_stack_corruption
Fix a stack corruption problem observed in nodemcu-firmware
2018-04-26 16:42:31 +03:00
Bogdan Marinescu
64bf894542 Fix a stack corruption problem observed in nodemcu-firmware
This PR is a mirror of
https://github.com/nodemcu/nodemcu-firmware/pull/2320/files. Thanks a
lot @TerryE for creating https://github.com/elua/elua/issues/120.
2018-04-26 16:40:57 +03:00
Bogdan Marinescu
6a71bb62c7
Merge pull request #121 from elua/fix_arm_compilation
Fix compilation for ARM targets using the GNU ARM Embedded toolchain
2018-04-26 16:32:01 +03:00
Bogdan Marinescu
f86fee03de Fix compilation for ARM targets using the GNU ARM Embedded toolchain
With a recent version of the GNU ARM Embedded toolchain
(7-2017-q4-major), compilation for ARM targets fails with this message:

```
[COMPILE] .build/ek-lm3s8962/src__fatfs__ff.o
src/fatfs/ff.c:288:9: error: conflicting types for 'sync'
 FRESULT sync ( /* FR_OK: successful, FR_DISK_ERR: failed */
         ^~~~
In file included from
/home/bogdanm/bin/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/reent.h:13:0,
                 from
/home/bogdanm/bin/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/reent.h:93,
                 from inc/newlib/devman.h:7,
                 from src/fatfs/ffconf.h:14,
                 from src/fatfs/ff.h:20,
                 from src/fatfs/ff.c:79:
/home/bogdanm/bin/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/unistd.h:289:9:
note: previous declaration of 'sync' was here
 void    _EXFUN(sync, (void));
         ^
[builder] Error building target
```

This PR fixes this build issue by renaming the internal "sync" function
in ff.c to "ff_sync".
2018-04-26 16:28:05 +03:00
Bogdan Marinescu
2e6a3af1c7
Merge pull request #116 from ramangopalan/master
print: minor enhancements for running lm3s games on stm32
2017-12-04 22:32:03 +02:00
Raman Gopalan
c5a7b61c33 print: minor enhancements for running lm3s games on stm32 2017-12-04 14:57:22 +05:30
Bogdan Marinescu
53ac0af56d
Merge pull request #115 from ramangopalan/master
TFT: module to control target's default display interface
2017-11-29 11:55:18 +02:00
Raman Gopalan
f595515e28 tft: Include function to put a point on screen 2017-11-29 08:48:12 +05:30
Raman Gopalan
d762d10cdb tft: Include brightness control function 2017-11-28 22:06:09 +05:30
Raman Gopalan
32176fe233 tft: Expose a few colors 2017-11-28 21:47:16 +05:30
Raman Gopalan
81ba2d54fe tft init: Expose uart configuration 2017-11-28 21:22:09 +05:30
Raman Gopalan
a7509e76b0 TFT: module to control target's default display interface 2017-11-28 16:25:15 +05:30
Bogdan Marinescu
9a617a67b6
Merge pull request #114 from ramangopalan/master
Buzzer: eLua module for elua-zeisig-gemacht target
2017-11-20 14:21:56 +02:00
Raman Gopalan
cd43eceb65 buzzer.c: Cleanup comment section 2017-11-18 16:45:15 +05:30
Raman Gopalan
70b9037696 Buzzer: eLua module for elua-zeisig-gemacht target 2017-11-18 16:42:32 +05:30
Bogdan Marinescu
e34bded76e Merge pull request #110 from ThomasHornschuh/elua_patches_th
Additional patches to eLua
2017-08-10 11:36:50 +03:00
Thomas Hornschuh
d8679e6a30 Changes to bit module cpu module and virtual timers for new pull request
Improved bit module and cpu module memory r/w functions to accept all
numbers and scale them down to the 2^32 number range. It now works
analogous to the bit32 module of lua 5.2.

Changed patches in commom_tmr.c according to Bogdans recommendations
2017-08-08 20:20:09 +02:00
Thomas Hornschuh
0ba85be499 Fix bad formating in src/lua, to avoid compiler warnings 2017-08-03 17:19:24 +02:00
Thomas Hornschuh
972b3ad8d4 Small "tuning" in uart module to avoid UART FIFO overflows on large receives 2017-08-03 17:14:50 +02:00
Thomas Hornschuh
90e86c6e7b added the tohex and rotate functions from http://bitop.luajit.org/ 2017-08-03 17:13:23 +02:00
Thomas Hornschuh
7a45fcde7a Bugfix in bit.c
The bit module did not work correctly with numbers where bit 32 was set,
because the conversion between the eLua floating point numbers from/to
integer was using signed integers.
For example
print(string.format("%x",bit.band(0x80000000,0x80000000))) resulted
output "7fffffff" instead of 80000000.

The patches in this commit ensure that all conversions are done with
unsigned integers.
2017-08-03 16:33:35 +02:00
Thomas Hornschuh
55b90c0c55 Bugfixes in common_tmr.c
Fixed the following bugs:
Disabling the timer interrupt with a period of 0 for a virtual timer did
not clear the vtmr_int_periodic_flag, so the timer is still reset
regulary when reaching the old interval. The fix adds clearing of the
flag when tmr.set_match_int is called with a period of 0.

The check afainst the maximum value in tmr.set_match_int was wrong, this
has been fixed. The input value is scaled to the timer ticks before the
check is made.
2017-08-03 16:30:44 +02:00
Thomas Hornschuh
d0a6375202 Added support for 1K xmodem
Preliminary support for 1K xmodem. Should make it configurable.
2017-08-03 16:29:31 +02:00
Bogdan Marinescu
7a877e14cf Merge pull request #109 from ThomasHornschuh/elua_net
Changed net.accept behaviour
2017-07-31 11:31:35 +03:00
Thomas Hornschuh
427ea3970f Changed net.accept behaviour
The original implementation of net.accept did not unlisten the port
after returing. So additional clients can connect to the port, but the
connection is not used. The easiest way to solve this, is to make an
unlisten() call before returning from accept. But I think it is better
to separate listen/unlisten from accept and let the system allow
accepting new connections in the background which can be later taken
with a call to accept. This allows for example using a coroutine waiting
for new connections with a non-blocking accept loop and a yield call.
This commit contains everything to implement the new behaviour and also
add the methods net.listen and net.unlisten. To be compatible with the
old semantics net.accept automatically calls listen to the port.

In addtion the error handling of accept was changed in a way that a
timeout returns the new return value net.ERR_WAIT_TIMEDOUT instead of
returning -1. I find this more consistent.
2017-07-30 20:52:27 +02:00
Thomas Hornschuh
13a633b5ca Fixed elua_uip.c behaviour for accept calls
Allow new incomming connections to be queued between accept calls. This
allows to build servers which accept several connection and server them
all with the help of coroutines.
2017-07-30 20:52:16 +02:00
Bogdan Marinescu
1c744f03eb Merge pull request #107 from ramangopalan/master
SDMMC: Correct CS pin to resolve access to SD card
2017-03-25 15:11:53 +02:00
Raman
61a9c626c7 SDMMC: Correct CS pin to resolve access to SD card 2017-03-25 18:10:59 +05:30
Bogdan Marinescu
3f86ae23d9 Merge pull request #105 from ramangopalan/master
elua-zeisig-gemacht: Get rid of enc on this target
2017-03-13 17:55:21 +02:00
Raman
0db8307a56 elua-zeisig-gemacht: Get rid of enc on this target 2017-03-13 20:27:20 +05:30
Bogdan Marinescu
639845306d Merge pull request #104 from ramangopalan/master
New stm32 target: elua-zeisig-gemacht
2017-03-13 15:07:52 +02:00
Raman
af6b525121 New stm32 target: elua-zeisig-gemacht 2017-03-13 18:28:07 +05:30
Bogdan Marinescu
854cb14885 Reverted to stack-based allocations in parser
Most of the stack based allocations were restored a while ago
in commit f86cfd345b145544baf9e4205f86800b3a44a9db. The ones still
left were causing problems (#92), so this commit reverts to
stack-based allocations completely. Note that this might increase
the RAM usage in some cases.
2017-02-25 20:30:59 +02:00
TerryE
81a4db53e4 [PATCH] Fix ECG case in concat where stack top not recalculated 2017-02-25 17:37:06 +02:00
Bogdan Marinescu
510a850579 Merge pull request #101 from ramangopalan/master
XMC4500 proto-card-v2: Add initial eLua support
2017-02-04 16:45:20 +02:00
Raman
98ddd542ee XMC4500 protocard-v2: Disable SDMMC 2017-02-04 20:02:04 +05:30
Raman
02b8e4c9bd XMC4500 proto-card-v2: Add initial eLua support 2017-02-04 19:58:12 +05:30
Bogdan Marinescu
6e940af3fc Merge pull request #100 from ramangopalan/master
XMC4400: Wire UART to see the eLua shell
2017-02-04 14:09:18 +02:00
Raman
5ac7ccaac3 XMC4400: Wire UART to see the eLua shell 2017-02-03 15:40:08 +05:30
Bogdan Marinescu
e239d3bd5c Merge pull request #99 from ramangopalan/master
XMC4400: Add XMC44 system files and support eLua files
2017-02-01 10:26:06 +02:00
Raman
9d4f9bef75 XMC4400: Add XMC44 system files and support eLua files 2017-02-01 07:55:57 +05:30