aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/syscalls.c
Commit message (Collapse)AuthorAgeFilesLines
* syscalls.c: Allow environment to specify heap boundaries.Marti Bolivar2011-09-121-6/+12
| | | | | | Rename HEAP_START/HEAP_END macros CONFIG_HEAP_START/CONFIG_HEAP_END, to mark them as build-time configuration options. Wrap their definitions with #ifndefs appropriately.
* [support/ld] Add linker support for reconfigurable heap.Marti Bolivar2011-09-121-13/+5
| | | | | | | | | | | | | | | - common_header.inc: Declare EXTERN symbols _lm_heap_start and _lm_heap_end. - common_rom.inc: Check for _lm_heap_start and _lm_heap_end. If they are defined, preserve their values. Otherwise, _lm_heap_start is starts after .bss, and _lm_heap_end is the end of SRAM. This allows existing linker scripts to continue using the old heap scheme, but allows for customizability elsewhere. - syscalls.c: Respect the addresses of _lm_heap_start and _lm_heap_end as the boundaries of the heap in _sbrk().
* syscalls.c: Bugfix _sbrk() implementation.Marti Bolivar2011-09-071-16/+31
| | | | | | | | | | | | Fix _sbrk() implementation so it properly rejects negative arguments which would send the program break below the heap start. Fix incorrect check against argument causing heap overflow. Also set errno properly to ENOMEM when the call fails. Beginning and end of the heap are now determined by HEAP_START and HEAP_END macros. Their current values seem to work OK for heaps on the internal SRAM, but they'll need to get generalized for Maple Native.
* syscalls.c: Remove fictitious uart_send() and broken comments.Marti Bolivar2011-09-071-10/+0
| | | | | | | | | uart_send() is not part of libmaple, and nm doesn't show it getting linked in from anywhere else, so I don't believe it exists. Remove it. Also remove some commented-out sections from getch(), putch(), _write(), and fgets(). These either reference uart_send() or use old libmaple APIs which no longer exist.
* Keep it 80-column clean.Marti Bolivar2011-06-071-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Go through overlong source code lines and convert as many of them as appropriate to be 80-column clean. This mostly affects license headers. Overlong lines are determined by running following from the libmaple base directory: $ ack-grep --nocolor --nogroup --cpp --cc --ignore-dir=usb -- '.{80}' Note that this excludes libmaple's usb subdirectory, which is still full of ST code that doesn't follow the libmaple source code guidelines. Contents of ~/.ackrc (these won't matter, but are included for completeness): --ignore-dir=docs --ignore-dir=build --type-set ld=.ld --type-set rst=.rst --type-set txt=.txt --type-set mk=.mk
* whitespace cleanupsMarti Bolivar2010-09-271-36/+18
|
* inital portability workbnewbold2010-08-251-7/+0
|
* Licensing: Relicensed libmaple under the MIT License.Perry Hung2010-03-311-0/+24
| | | | | | Relicensed the bulk of libmaple under the more permissive MIT License, from GPLv3. Files that were largely or entirely derived from the Arduino, STM, or Lanchon retain their original licenses.
* Major hierarchy reorganization; see README.bnewbold2010-03-311-0/+157
copy-to-ide and Makefile updated to conform; .gitignore added; LICENSE added