We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BGM220
2.1.0
any
No radio
none
Current version of the API does not contain a function that would return a free heap size:
If I'll try to use classic ARM GCC or FreeRTOS approach - the free heap return values are not realistic.
This is a test sketch:
extern "C" void * _sbrk (int); static uint32_t ARM_getFreeHeap() { char top; return &top - reinterpret_cast<char*>(_sbrk(0)); } void setup() { Serial.begin(38400); Serial.print("Free Heap #1 = "); Serial.println(ARM_getFreeHeap()); Serial.println(); HeapStats_t HeapStats; vPortGetHeapStats(&HeapStats); Serial.println("Heap Stats:"); Serial.println(HeapStats.xAvailableHeapSpaceInBytes); Serial.println(HeapStats.xSizeOfLargestFreeBlockInBytes); Serial.println(HeapStats.xSizeOfSmallestFreeBlockInBytes); Serial.println(HeapStats.xNumberOfFreeBlocks); Serial.println(HeapStats.xMinimumEverFreeBytesRemaining); Serial.println(HeapStats.xNumberOfSuccessfulAllocations); Serial.println(HeapStats.xNumberOfSuccessfulFrees); Serial.flush(); } void loop() { }
And this is the output:
Free Heap #1 = 4294956124 Heap Stats: 0 0 4294967295 0 0 0 0
The output above indicates that neither sbrk() nor FreeRTOS methods work properly.
Could you, please, provide an API function that would return the free heap size ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hardware
BGM220
Core version
2.1.0
Arduino IDE version
any
Operating system
any
Radio stack variant
No radio
OpenThread Border Router device (if using Matter)
none
Issue description
Current version of the API does not contain a function that would return a free heap size:
If I'll try to use classic ARM GCC or FreeRTOS approach - the free heap return values are not realistic.
This is a test sketch:
And this is the output:
The output above indicates that neither sbrk() nor FreeRTOS methods work properly.
The request is:
Could you, please, provide an API function that would return the free heap size ?
The text was updated successfully, but these errors were encountered: