This is a set of snippets to get LiteX to statically build software as part of the gateware build process. The goal is to have only a single SRAM, rather than wasting block RAM on a separate ROM and RAM partition, and to have a small chunk of code loaded in that RAM that is built as part of the gateware build process, but not necessarily the LiteX BIOS.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ported from humanshader.com; paste into shadertoy */ | |
void mainImage( out vec4 fragColor, in vec2 fragCoord ) | |
{ | |
float x = fragCoord.x / iResolution.x * 70.0; | |
float y = (iResolution.y - fragCoord.y) / iResolution.y * 39.0; | |
float u = x - 36.0; | |
float v = 18.0 - y; | |
float h = u*u+v*v; | |
float R, G, B; | |
if (h < 200.0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define FLAG_CLR_P(val, flag) (((val) & (flag)) == 0) | |
struct hdr { | |
uint16_t v_0x5001; /* 01 50 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#define POLY 0x04C11DB7 | |
uint32_t crc_table[256]; | |
uint32_t update_crc_slow_1byte(uint32_t crc, uint32_t data) { |
I hereby claim:
- I am jwise on github.
- I am jwise (https://keybase.io/jwise) on keybase.
- I have a public key whose fingerprint is 4506 177A 4CB2 661A 3C35 75BA 9080 C092 EA80 E0B4
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KERNEL: kernel_link | |
DUMPFILE: dump.201310210007 [PARTIAL DUMP] | |
CPUS: 4 | |
DATE: Mon Oct 21 00:06:20 2013 | |
UPTIME: 00:01:07 | |
LOAD AVERAGE: 0.89, 0.28, 0.10 | |
TASKS: 411 | |
NODENAME: moroso | |
RELEASE: 3.2.0-4-amd64 | |
VERSION: #1 SMP Debian 3.2.46-1+deb7u1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) lua_globals L | |
(gdb) lua_gettype $rv | |
(gdb) lua_gettable $rv "string" | |
Walking node part... | |
Value at node idx 1 Key [STRING]: string -> value type 5 @ (TValue *)0x81012cc | |
(gdb) lua_gettype $rv | |
(gdb) lua_walktable $rv | |
Walking array part... | |
Walking node part... | |
Value at node idx 0 Key [STRING]: sub -> value type 6 @ (TValue*)0x8100160 |