The correct way to overrride the malloc family of functions in newlib-nano is
to provide the *_r (reentrant) variants. Newlib implements the "normal"
functions on top of these (see the newlib source code). Also, internally it calls
the *_r functions when allocating buffers.
If only the "normal" non-reentrant functions are provided this will mean that
some of the code will still use the vanilla newlib allocator. Furthermore, if
one uses the whole heap as a pool for TLSF then the system may in the best case
crash as there is no enough memory for its internall allocations or in the worst
case function eratically (this depends on how the heap reserved, there is an
upcomming series of commits in that direction).
This commit splits the handling between newlib and native. It also prepares the
ground for future work on the pool initialization.
Right now I could only test this in ARM and native and I cannot ensure it will
work on other platforms. Replacing the system's memory allocator is not something
that can be taken lightly and will inevitably require diving into the depths of
the libc. Therefore I would say that using TLSF as a system wide allocator is ATM
supported officially only on those plaftorms.
Testing:
Aside from reading the newlib sources, you can see the issue in a live system
using the debugger.
Compile any example (with or without tlsf-malloc), grab a debugger and place
a breakpoint in sbrk and _sbrk_r. Doing a backtrace will reveal it gets called
by _malloc_r.
- oonf_api has not been updated in 6 years, it's stil at 0.3.0
from 2013.
- tests were never integrated into CI
- With NHDP the only upstream user of the package is deprecated.
- Downstream users would rather prefer a less vintage version of the libraray.
This is to avoid conflics with other config.h files, e.g. when building
for esp8266 where $(NEWLIB)/xtensa-lx106-elf/include/config.h gets
included instead.
The OONF package is combining multiple ".a" file into a single archive. The
way it was being done involved creating and changing directories, unpacking
the original archives and repacking them into a combined one.
Theis has a couple of issues:
- It is untidy and wasteful.
- It breaks when thin archives are enabled, as a thin archive cannot be
unpacked.
This commit uses a MRI script to do the combining step. It works both with
and without thin archives and is cleaner overall.
An issue that remains to be soved is that make is calling itself to create the
archive, as the PARTIAL_ARCHIVES are not known before hand. This is hacky. It
can be solved but it is a subject for another PR.
There is no reason why this package would need tlsf. Using tlsf as
system malloc is not known to work in all platforms.
With this patch CCN-Lite will use the default malloc provided by the
target's C library.
A (void*) function was declared as (void**) because one of the void pointers
was hidden behind a typedef. Because of the way a void* works, this has no
consequences, but it is confusing.
softdevice needs the memory at 0x2000 to be initialized to 0xffffffff
according to #5893 and testing. However, the addresses [0x8bc, 0x3000[ are not
set in softdevice.hex.
So use a modified hex file with all the memory set to 0xff as it is the rom
reset value anyway.
This change updates the `.hex` file instead on relying on erasing the
memory.
To avoid priority conflicts with the WiFi hardware driver thread which has priority of 1, the default thread priority of lwIP's TCP/IP thread is decreased to 2.
- Add SEMTECH_LORAMAC_ALREADY_JOINED ret code for semtech_loramac_join
- Add SEMTECH_LORAMAC_TX_CNF_FAILED ret code for semtech_loramac_send
- Update shell commands to notify when no ACK is received on cnf tx
The internal Openthread config file is not needed for the contrib
files, since it only includes internal OpenThread configuration
(use by the Openthread build system). Under certain cases some
macros defined in Openthread collide with RIOT internals or vendor
headers. So it's important to keep dependencies consistent.
After removing the default definitions of lua module tables and table
lengths (see lua_builtin.h) the symbols have been left undefined, which
results in them getting an address of NULL and a crash if there are no
user symbols and the user attempts a "require".
This patch checks the address of the table length variable and fails the
module search function of the table is not set (i.e. it behaves as if the
table was empty.)
The module searchers in the `require` package should return a string
if the module is not found, and not raise an error.
See: https://www.lua.org/manual/5.3/manual.html#pdf-package.searchers
Also make error strings contain newlines and tabs just like the original
ones.
After a successful OTAA join procedure, the network may change the RX2 channel datarate. It's
required to also persist to be able to correctly receive downlink after a reboot
$ git log --oneline dbf51f03c5058746b4c4b3d6fdcd3d0357c5da36..HEAD
ae4dd94 Merge pull request #38 from noahp/noahp/check-url
b1371aa 🔗 update Check link
65bf740 Merge pull request #35 from gdpinchina/master
61c6ef7 fix test for gga
4514f6d fix test for gga
113221d fix test for gga
35b00bc fix test in gga
9fcd245 remove indent
59c3e0a fix gga char alignment problem in test.c
79b964a modefy initialization for dgps_age
c4a5a01 modify dgps_age type
c01cbcf modify dgps_age type
cd27e72 Merge pull request #29 from swilson/master
4d97109 Fix compiler warnings.
0456bbb Define timegm
04f1141 Add TI-RTOS compat header
8e4fc4e README.md: formatting fixes
0b02771 minmea.h: add Windows compatibility layer
ded4faf Merge pull request #25 from asund/master
f50449e Fixup whitespace
80af9b4 * Arrange year interpretation in order of likeliness * Add unit tests
ef8bca7 clarity of century use in struct tm
486da2b Small fixes to minmea_gettime * Handle four digit years provided by ZDA in minmea_gettime * Assume GPS epoch to allow dates prior 2000 to be parsed
In function `_semtech_loramac_send` parameter `payload` can be NULL (that the
case when scheduling an immediate TX, line 726). As DEBUG macro use printf,
a %s parameter can't be NULL so we have to handle that case.
c25519[1] is a library optimized for embedded applications handling ed25519
signing and x25519 crypto. It uses significantly less memory and flash
compared to TweetNaCl and is significantly faster when used on a
samr21-xpro
[1]: https://www.dlbeer.co.nz/oss/c25519.html