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

7 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
698f6e251c Various fixes in STM32F4 code 2013-05-28 17:18:18 +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
cb93117f42 switched the lpc24xx platform to the new build configuration 2012-07-13 12:09:11 +03:00
Bogdan Marinescu
59beff6b99 working on the new build configurator. starting to get shape 2012-07-01 01:07:59 +03:00