Comments (4)
@mchack-work
I've worked on this today. Draft PRs here #40 and tillitis/tkey-ssh-agent#18
I'm trying 8 kb stack, and it mostly works. The issue I see is that the setup of new stack doesn't seem to bite. https://github.com/tillitis/tillitis-key1-apps/pull/18/files#diff-3857988385a284fb03dc747adb79566dac6d15e071f51256f9a7e702e4208d62R84
li sp, NEW_STACK
might not be enough? The second time the program puts &stack
, the addr is the same as the first. Some proper relocation needed? But how?
Might there then be other issues due to not doing proper relocation? I'm not so familar with riscv addressing yet, could there be address references that needs to be relocated? But the jump to forever_ledflash()
works at least...
from tillitis-key1.
We probably can't do any relocation as inline assembler. If so, we're messing with the C runtime.
In our relocation example we want to run the relocation before starting running C code. This probably means linking with another libcrt0 if people want support for relocation.
I think it's more important to allow for larger device apps (make the stack smaller) than thinking about dynamic relocation.
from tillitis-key1.
Ah yes, I tried my hand at accomplishing relocation by having a different app.lds and crt0.S. Relocating the init crt0 at 0x40002000 and the app C main at 0x40010000. Setting the stack below that in crt0.S. It almost worked, except the call main
ended up executing a jump to 0x40012000 -- too high. But it feels like this could be possible, just have to get the lds script right.
I think I'll leave the example app outside scope of this issue. And also settle on 16 kb stack, 8 seems a bit too small
from tillitis-key1.
Closed with these:
tillitis/tkey-ssh-agent#18
#40
from tillitis-key1.
Related Issues (20)
- Add a Verilog formatter
- Make testbenches self testing, and with correct exit code
- Idea: ability (but not enforced) to clear (or R/W) CDI HOT 4
- Improve community information about the project HOT 1
- Increase clock frequency of application_fpga HOT 2
- Clean up UDI and UDS implementation as well as udi_uds_patch program
- Add support for client based device reset HOT 14
- support for OpenPGP? HOT 1
- Rewrite code to reduce resource allocation HOT 1
- Update core local Makefiles to use Verilog-2005 for sim, linting
- Hardware support to access flash from CPU
- Signal to firmware not to load app from flash HOT 2
- FW: Optionally start app from flash
- CH552 fw: Support for different USB classes: CDC and HID
- Support communication to different USB endpoints
- FIDO2 device app
- Change names of ADDR_RAM_ASLR and ADDR_RAM_SCRAMBLE HOT 1
- Device app to test hold touch HOT 1
- Remove possible redundant RAM clearing functionality HOT 2
- Remove possibly redundant randomized RAM scrambling during randomised RAM fill HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tillitis-key1.