• Stars
    star
    73
  • Rank 433,657 (Top 9 %)
  • Language
    Zig
  • Created over 5 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

minimal Zig embedded ARM example (STM32F103 blue pill)

embedded_zig

A "minimal" ARM cortex-M firmware in Zig running on a STM32F103. It blinks.

building

Get GNU Arm Embedded Toolchain and Zig in PATH and type:

make

running on a bluepill

Run OpenOCD on a terminal:

openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/share/openocd/scripts/target/stm32f1x.cfg

Open your favorite GDB:

arm-none-eabi-gdb firmware.elf -ex 'target extended-remote :3333'
load
r

Bonus: you can type make inside gdb and load it again.

issues

If you have any linking issues uncomment the line below (in the Makefile) to use GNU ld:

#    zig build-exe ${BUILD_FLAGS} $(OBJS:%=--object %) --name [email protected] --linker-script ${LINKER_SCRIPT}
   arm-none-eabi-ld ${OBJS} -o [email protected] -T ${LINKER_SCRIPT} -Map [email protected] --gc-sections

raq (rarely asked questions)

a) Shouldn't the Makefile...

A: lalalala

b) How do I flash this?

A: see running on a bluepill

c) Why didn't you use @cImport()?

A: yes

More Repositories

1

nus_console

Nordic UART Service (NUS) console
JavaScript
12
star
2

Sublime-OpenScad

OpenScad syntax definitions for ST
7
star
3

node-dablooms

dablooms nodejs module
C++
7
star
4

libvirt-rproxy

node http reverse proxy for libvirt
JavaScript
6
star
5

prettyson

(super lazy) JSON command line prettifier
JavaScript
5
star
6

pubnubjs

Pipelined PubNub nodejs client
JavaScript
4
star
7

node-rapleaf

Rapleaf API client for node.js
JavaScript
3
star
8

jquerymobile-odata-phonegap-handlebars

see the title
JavaScript
3
star
9

MailMiner

A Thunderbird extension
JavaScript
3
star
10

thread_tools

Ruby thread utilities
Ruby
2
star
11

skel

Extremely simple home folder skeleton
Vim Script
2
star
12

docker-embedded

Embedded (ARM/AVR/Xtensa-ESP32) development image based on Archlinux
2
star
13

connect-throttle

connect middleware for throttling requests
JavaScript
2
star
14

yadslib

Yet another data structures library
C++
2
star
15

tralamazza.github.com

me blog
Ruby
1
star
16

inotifywatch

nodejs inotify wrapper
JavaScript
1
star
17

octo

Octopart API node.js wrapper
JavaScript
1
star
18

Blackjack

Simple command line Blackjack game in Ruby
Ruby
1
star
19

kickstarter-monitor

Ruby
1
star
20

circular_buffer

1
star
21

bear-hunter-ninja

or rock paper scissors
JavaScript
1
star
22

connect-stats

Connect (node.js) statistics
JavaScript
1
star
23

rapleaf-proxy

RapLeaf API proxy with a few extra goodies
JavaScript
1
star
24

zupa-wars

Clojure
1
star
25

esproomba

Roomba WiFi adapter
KiCad Layout
1
star
26

redis-cluster-setup

dirty redis-server cluster setup
Shell
1
star
27

pubnub-crash-test

JavaScript
1
star
28

chromebook-linux-files

samsung chromebook linux files
Shell
1
star
29

backbonejs-template

A backbonejs application template inspired/copied from http://backbonetutorials.com/organizing-backbone-using-modules/
JavaScript
1
star
30

rapleaf_qwerly_mailchimp

Integrates RapLeaf and Qwerly to your Mailchimp account
JavaScript
1
star