Skip to content

Instantly share code, notes, and snippets.

View MarsTechHAN's full-sized avatar

Martin Han MarsTechHAN

  • PR of China, Guangdong, Shenzhen
View GitHub Profile
@MarsTechHAN
MarsTechHAN / bin2c.py
Last active April 1, 2025 12:04
Program Gowin from ESP32
import struct
import sys
if __name__ == '__main__':
fs = open(sys.argv[1], 'rb')
with open('fs.c', 'w+') as f:
print('const unsigned char fs_bitstream[] __attribute__((aligned(128))) ={', file=f)
counter = 0
while 1:
counter = counter + 1