mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-08-21 06:23:07 +08:00
override _sbrk instead of _sbrk_r and repair merge
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
//int _fstat(int file, struct stat *st) {}
|
||||
//int _isatty(int file) {}extern char _end; // provided by the linker script
|
||||
|
||||
extern char _end; // provided by the linker script
|
||||
extern char _heap_end_max; // provided by the linker script
|
||||
void* _end_ptr = &_end;
|
||||
void* _heap_end_max_ptr = &_heap_end_max;
|
||||
@@ -39,7 +40,7 @@ void* heap_end_ptr = 0;
|
||||
* @return A pointer to the newly allocated block on success
|
||||
* or -1 otherwise.
|
||||
*/
|
||||
intptr_t _sbrk_r(struct _reent *ignored __attribute__((unused)), size_t size) {
|
||||
intptr_t _sbrk(size_t size) {
|
||||
intptr_t ptr;
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
|
||||
@@ -109,6 +109,7 @@ end
|
||||
-- TODO: cleaner separation of the platform code and the rest
|
||||
stm_includes += 'MotorControl'
|
||||
stm_includes += 'Drivers/DRV8301'
|
||||
stm_sources += boarddir..'/Src/syscalls.c'
|
||||
build{
|
||||
name='stm_platform',
|
||||
type='objects',
|
||||
|
||||
Reference in New Issue
Block a user