Giter VIP home page Giter VIP logo

pic-build-tool's Introduction

pic-build-tool

MIT License

Linux 上で CUI のみで, PIC マイコンのソースコードを Build, Write する Makefile を作成したので公開する.

Enviroment

Hardware

Software

~/.bashrc に以下を追記*1.

export PATH="$PATH:'/opt/microchip/xc8/v2.10/bin'"

*1: XC8 をインストール時に, 追記するか問われる.

Files

./
├── ./LICENSE
├── ./Makefile
├── ./README.md
├── ./TroubleShooting.md
├── ./circuit
│   ├── ./circuit/actual.jpg
│   ├── ./circuit/led_blink.svg
│   └── ./circuit/led_blink.txt
├── ./src
│   └── ./src/main.c
└── ./tool
    └── ./tool/ipecmd.sh
File Content
./LICENSE LICENSE
./Makefile 今回公開したいもの
./README.md これ
./TroubleShooting.md Trouble Shooting で使用
./circuit/actual.jpg Example で使用
./circuit/led_blink.svg Sample Program に使用
./circuit/led_blink.txt goat で svg ファイルを生成するためのソース
./src/main.c デモ用プログラム
./tool/ipecmd.sh Microchip 社が提供する ipecmd.jar を呼び出すスクリプト

Sample Program

PIC12F1822 のピン番号 7 に接続された LED が 1 秒周期で点滅する.

Circuit

Example

make
xc8-cc -mcpu=12F1822 -mwarn=-9 -o build/led_blink.hex src/main.c
src/main.c:34:: warning: (752) conversion to shorter data type

Memory Summary:
    Program space        used    1Fh (    31) of   800h words   (  1.5%)
    Data space           used     4h (     4) of    80h bytes   (  3.1%)
    EEPROM space         used     0h (     0) of   100h bytes   (  0.0%)
    Data stack space     used     0h (     0) of    70h bytes   (  0.0%)
    Configuration bits   used     2h (     2) of     2h words   (100.0%)
    ID Location space    used     0h (     0) of     4h bytes   (  0.0%)
make writew
./tool/ipecmd.sh -P12F1822 -TPPK3 -Fbuild/led_blink.hex -M -W5.0
*****************************************************
Connecting to MPLAB PICkit 3...
Currently loaded firmware on PICkit 3
Firmware Suite Version.....01.56.02
Firmware type..............Enhanced Midrange
Programmer to target power is enabled - VDD = 5.000000 volts.
Target device PIC12F1822 found.
Device Revision ID = 9
Device Erased...
Programming...
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x7ff
configuration memory
Programming/Verify complete
PICKIT3 Program Report
19-11-2019, 01:08:50
Device Type:PIC12F1822
Program Succeeded.
Operation Succeeded

actual

Trouble Shooting

./TroubleShooting.mdを参照.

LICENSE

MIT License

pic-build-tool's People

Contributors

jsaka1259 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.