Please note the heap address of the both the banks must not be contigious else
GCC considers it to be single memory bank and does allocation across the banks,
which might result into hard-fault
To have the flexibilty in application; to use any of the section
(data/bss/heap) without updating linker script in every use case,
following decisions are made:
1. Fixed size and small sections moved to SRAM2 (32K)
Vectors
Crash data
Stack
Remaining section - Heap memory
2. Large memory space should be used for variable sections
Data
BSS
Heap - Remaining section
Heap is moved to the end of both sections as GCC allocates till 4K boundary,
if end of heap is not aligned to 4K, that chunk of memory will go unutilized
Using malloc will require us to add stdlib.h somewhere in the path for
the application. Maybe the CI apps are adding stdlib.h and that's why
the code would have worked. In a custom app, it can happen that the
header is not included. Using new avoids the need to add stdlib.h
anywhere and it is more in line with C++.
For default construction of the driver, it would be necessary to define
the pins. However as we don't know the correct pins, until/unless user
sets them up for us. So it makes sense to mark the pins as NC. It would
be easier to debug if the pins are set to NC if user forgot to set them
up.
When zipping up projects, the makefile exporter brings every directory
supplied as --source under the same directory, even if they are in a
parent directory. There was some code that was clearing the leading
"../" components. This lead to an empty string ("") being supplied to
the "into_path" arg for "resources.add_directory". Since "" is not None,
the default behavior to place it in the same directory was not being
used. The extra "" caused a leading "/" to be added, making everything
placed a the absolute root of the filesystem ("/").
Now we check to see if the "into_path" is an empty string and ignore it
if that's the case.
The FileRefs allow you to preserve the correct file paths in the online
compiler. It also allows you to preserve the correct file paths for
generated files.
### Description
These directories have contained exclusively dead code for as long as
I can remember. Now is as good of a time as any to remove them.
### Pull request type
[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change