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
Remaining section - RW / ZI
2. Large memory space should be used for variable sections
RW/ZI
Heap - (Minimum - 0x12000)
Stack - At bottom
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
To make this driver more useful, we needed to do some changes. The
wirings for the modem can differ on the board so we also need to be
flexible in our approach.
It is now mandatory to provide the power pin and pin polarity in the
constructor alongwith the file handle. Reset pin is optional.