Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/le-krogoth/mc_hello_linux
Small project to test platformio for Linux x86_64 platform
https://github.com/le-krogoth/mc_hello_linux
learn-to-code linux platformio
Last synced: 26 days ago
JSON representation
Small project to test platformio for Linux x86_64 platform
- Host: GitHub
- URL: https://github.com/le-krogoth/mc_hello_linux
- Owner: le-krogoth
- License: agpl-3.0
- Created: 2022-05-06T08:51:28.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-05-06T09:20:31.000Z (over 2 years ago)
- Last Synced: 2024-11-08T11:12:23.815Z (3 months ago)
- Topics: learn-to-code, linux, platformio
- Language: C
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mc_hello_linux
Small project to test platformio for Linux x86_64 platform
# Howto
## make sure that Debian loads ./local/bin into the Path from .profile
> mkdir ~/bin
## if not already installed
> sudo apt install python3-pip
## install / update platformio to latest
> pip install -U platformio
## go to your dev folder
> cd ~/my-dev-folder
## make new and enter dev directory
> mkdir mc_hello_linux
> cd mc_hello_linux/## Initialise platformio
> pio project init
## Change config accordingly
> nano platformio.ini
```
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter, extra scripting
; Upload options: custom port, speed and extra flags
; Library options: dependencies, extra library storages
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html[env:linux_x86_64]
platform = linux_x86_64
```## Write the hello world source file
> nano src/main.c
```
#includeint main()
{
printf("Hello World!\n");
return 0;
}
```## Compile / Build project
> pio run
## Run program
> .pioenvs/native/program
## Clean build files
> pio run --target clean
# Short route for cheaters
## Get this project> git clone https://github.com/le-krogoth/mc_hello_linux.git
## Enter directory
> cd mc_hello_linux/
## Compile / Build project
> pio run
## Run program
> .pioenvs/native/program
## Clean build files
> pio run --target clean