1
0
mirror of https://github.com/elua/elua.git synced 2025-01-08 20:56:17 +08:00

32 Commits

Author SHA1 Message Date
Bogdan Marinescu
acff101dbb Fix for weird compilation error 2018-06-12 01:03:28 +03:00
Bogdan Marinescu
9dffa3ce81 New feature: memory error callback
This PR adds the possibility of specifying a memory error callback in
the "ram" element of the "config" section. The new configuration
attribute is called "memory_error_callback" and its value is the name of
a function with the signature "void f(size_t)" that will be called
automatically in the following cases:

- when malloc, calloc, or realloc (with the 'size' argument greater than
  0) return NULL. The callback function will be called with the 'size'
  argument of the allocation function.
- when the allocator encounters an internal error (only when using the
  'multiple' allocator). The callback function will be called with the
  argument set to 0.

For now, this feature is only availabsle when using the multiple
allocator or the simple allocator, not the built-in libc allocator.

Usage example (in the board configuration file):

```
   config = {
     ram = { memory_error_callback = "memory_error" }
   }
```
2018-06-11 21:48:46 +03:00
Bogdan Marinescu
73af8565de Spelling fix 2018-06-11 20:20:32 +03:00
James Snyder
81b2c5f5ab Add some support for out-of-tree builds
This commit allows the build system to be used with directories outside of the eLua tree,
using the new "conf" and "extraconf" arguments to the builder.

This commit contains code from both @jsnyder and @darren1713.
2018-06-01 00:59:49 +03:00
Bogdan Marinescu
788f4e3fd1 New configuration for shell_config
It is now possible to configure each individual command that will be compiled in the shell:

```
shell = { commands = {'ls', 'ver', 'type' } }
```

If not specified, all the available commands will be compiled (which is backwards compatible).

Also, the `advanced_shell`  attribute is gone, replaced with an `advanced` key in the shell
configuration. So write this:

```
shell = { advanced = true }
```

instead of this:

```
advanced_shell = true
```
2018-05-23 11:09:32 +03:00
Bogdan Marinescu
69c653accd New file system: NIFFS
For more details check https://github.com/pellepl/niffs.
2018-05-19 23:02:27 +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
James Snyder
b9e5096027 Include remaining platform modules when some fail guards 2013-11-11 13:43:05 -06:00
naves.thiago
02705ec2fb Revert last commit 2013-08-31 17:58:40 -03:00
naves.thiago
ed65d0102d added ps_modules_name constant to board configuration at board/known to optionally define the name of the platform specific modules table 2013-08-31 16:52:24 -03:00
naves.thiago
c29b8aa311 Change platform specific module name from platform name to board name (ex: lpc17xx.pio becomes mbed.pio) 2013-08-31 14:52:32 -03:00
Bogdan Marinescu
2dff752740 Added stm32.pio platform specific module
Also removed the platform specific initialization code, this is now
automatic.
2013-08-14 00:33:29 +03:00
Bogdan Marinescu
91946fc05e STM32F4 CDC UART support + other CDC changes
This should really be more than one commit, but here it goes anyway:

- added STM32F4 CDC UART support. For some reason, it seems to work only
on the OTG_FS interface, the OTG_HS interface enumerates it, but
doesn't seem to send/receive any data.
- removed the "platform interface" functions for CDC UART. That was
never really a platform interface, just a couple of functions reading
and writing data from/to a CDC UART. Now each backend takes care of this
as a special case in its platform_uart_xxx functions.
- added buffering support for CDC UARTs
- added uart.CDC to the uart module, so the CDC uart can be used directly
from Lua.
- stm32f4discovery now defaults to using the CDC, since it doesn't have
a dedicated UART connector.
2013-06-26 01:04:34 +03:00
Bogdan Marinescu
698f6e251c Various fixes in STM32F4 code 2013-05-28 17:18:18 +03:00
Bogdan Marinescu
89acc4910b Various fixes
- build_release.lua changed to use the new build system
- checked for proper compilation of all known configurations (boards/known/)
- fixed various small issues in the builder/utils library
- added 'disp_mode=minimal'
2013-05-25 19:52:36 +03:00
Bogdan Marinescu
400ab5bee5 Support for multiple SD cards added in the configurator
Documentation updated.
2013-05-25 14:18:32 +03:00
Bogdan Marinescu
e5b64a46fe More work on the configurator
- started on the docs
- added the 'autoenable' attribute to some components
- moved LM3S ADC-specific configuration data to the LM3S backend
2013-05-24 12:21:16 +03:00
Bogdan Marinescu
463f0bceda Merge branch 'master' into luabuild
Conflicts:
	.gitignore
	src/common_tmr.c
	src/platform/lm3s/platform.c
	src/platform/lm3s/platform_conf.h
	src/platform/sim/platform_conf.h
	src/platform/stm32/platform_conf.h
	src/platform/str9/platform_conf.h
  utils/build.lua

Also fixed some minor issues in the builder.
2013-04-25 16:55:29 +03:00
Bogdan Marinescu
070e59e55b converted LM3S to the new build system + other fixes
Added 'board' and 'cpu' arguments to backend configuration functions.
2012-09-09 02:43:49 +03:00
Bogdan Marinescu
e96a926df3 Added proper platform modules handling 2012-08-19 18:43:11 +03:00
Bogdan Marinescu
d09bea3273 Platform conversion + other changes
- AVR32 platform converted to use the new build system
- new section in configuration: 'build'. Used to set predefined
  build parameters (such as allocator, target, boot mode...)
2012-07-20 23:30:25 +03:00
Bogdan Marinescu
767b9243f9 changed module selection mechanism 2012-07-15 00:50:12 +03:00
Bogdan Marinescu
37e20330e7 LPC17xx modified for the new build system + other changes
- more flexible specification of the RAM structure in the build configuration file
- fix for allocator choice in build_elua.lua
2012-07-14 20:00:54 +03:00
Bogdan Marinescu
449716c477 LPC288x platform conversion + other changes
- LPC288x platform converted to the new build system
- changed generation for the 'extmem' attribute
- added combined attributes (validated against two or more possible types)
2012-07-14 16:46:31 +03:00
Bogdan Marinescu
8af2c5d088 str7 platform converted to the new build system 2012-07-14 13:18:29 +03:00
Bogdan Marinescu
cb93117f42 switched the lpc24xx platform to the new build configuration 2012-07-13 12:09:11 +03:00
Bogdan Marinescu
a26d5423e1 Multiple changes
- platform 'sim' switched to the new build system
- fixed a few macro definitions
2012-07-12 14:07:59 +03:00
Bogdan Marinescu
dd12c470a7 Switched STM3210E-EVAL to the new build system 2012-07-12 13:47:29 +03:00
Bogdan Marinescu
aa529adf9b et-stm32 board description file DONE + other fixes/improvements 2012-07-12 01:50:38 +03:00
Bogdan Marinescu
5ce6a8aef6 Multiple changes
- more build configuration attributes (allocator, target)
- more sanity checks
- more color in the builder
- 'romfs' is now a separate builder target, not a function being called separately
- added mappings for the configurator attributes
2012-07-01 20:59:55 +03:00
Bogdan Marinescu
e713e9866d More work on the configurator
- more logical generator for 'shell'
- added TCP/IP component and validation for TCP/IP data
- added 'needs' as a basic way to specify dependencies
2012-07-01 20:50:47 +03:00
Bogdan Marinescu
59beff6b99 working on the new build configurator. starting to get shape 2012-07-01 01:07:59 +03:00