Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trivialmips/TrivialMIPS_Software
Baremetal softwares for TrivialMIPS platform
https://github.com/trivialmips/TrivialMIPS_Software
Last synced: 2 months ago
JSON representation
Baremetal softwares for TrivialMIPS platform
- Host: GitHub
- URL: https://github.com/trivialmips/TrivialMIPS_Software
- Owner: trivialmips
- Created: 2018-08-09T06:12:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-12T05:36:44.000Z (over 5 years ago)
- Last Synced: 2024-08-03T01:16:36.411Z (6 months ago)
- Language: Assembly
- Homepage:
- Size: 391 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Software for TrivialMIPS
## Structure
The project contains source code that runs on board and tools/scripts that can be used to convert the source code to proper format:
* `bootrom` folder contains programs that will be pre-initialized in bootrom, whose entry point is `0xBFC00000`. The output will be a `filename.coe` file, which can be used in the customization of Block RAM IP.
* `ram` folder contains programs that are intened to be written to SRAM, whose entry point is `0x80000000`. By design, the final output of a program are two files: `filename.base.bin` and `filename.ext.bin`. You should write it to two slies of SRAM respectively by offset 0. The output of `bootrom/boot_from_mem.s` should be used in bootrom in order to jump to the entry point of SRAM.
* `func_test` contains functional tests from Loongson
* `perf_test` contains performance tests from Loongson## Endianness
> Endianness __MATTERS__! --Harry
The CPU itself is little-endian, that is, the most significant byte is the one with the highest address. As for initialization files, `coe` and `mem` files put MSB on the leftmost side, so `0x12345678` will still be `12345678` in these files. For little-endian binary memory files, it will be `0x78 0x56 0x34 0x12`, and `xxd` will show it as `78563412`. The compiler and linker should be set in Big Endian mode (`-EL`) when compiling from assembly or C/C++ code.
The converter from `bin` to `mem` we use does the following work on each line of the given file:
* read 4 bytes (`0x78 0x56 0x34 0x12`)
* write it out in reverse sequence (`12345678`)