├── .github └── FUNDING.yml ├── boards └── samr34xpro.json ├── platform.json └── README.md /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ESUP9LCZMZTD6 13 | -------------------------------------------------------------------------------- /boards/samr34xpro.json: -------------------------------------------------------------------------------- 1 | { 2 | "vendor": "Microchip", 3 | "name": "Microchip ATSAMR34 Xplained Pro (S)", 4 | "url": "https://www.microchip.com/design-centers/wireless-connectivity/low-power-wide-area-networks/lora-technology/sam-r34-r35", 5 | "build": { 6 | "mcu": "SAMR34J18B", 7 | "core": "samr34", 8 | "variant": "samr34xpro", 9 | "arduino-ld": "samr34j18b_flash.ld", 10 | "baremetal-ld": "samr34j18b_flash.ld" 11 | }, 12 | "debug": {}, 13 | "frameworks": [ "arduino", "baremetal" ], 14 | "upload": { 15 | "maximum_ram_size": 40000, 16 | "maximum_size": 256000, 17 | "tool" : "atprogram", 18 | "args" : [ "-i", "SWD", "-t", "edbg", "-d", "ATSAMR34J18B", "-cl", "10MHz" ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /platform.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sam-lora", 3 | "title": "Microchip SAMR34 SAMR35", 4 | "description": "Sam LoRa 2020 Georgi Angelov", 5 | "url": "http://platformio.org/platforms/", 6 | "homepage": "http://www.wizio.eu", 7 | "license": "Apache-2.0", 8 | "engines": { "platformio": "^3.0.0" }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/platformio/platform-sam-lora.git" 12 | }, 13 | "version": "0.1.2", 14 | "packageRepositories": [ 15 | "https://dl.bintray.com/platformio/dl-packages/manifest.json", 16 | "http://dl.platformio.org/packages/manifest.json" 17 | ], 18 | "frameworks": { 19 | "arduino": { 20 | "package": "framework-sam-lora", 21 | "script": "builder/frameworks/arduino.py" 22 | }, 23 | "baremetal": { 24 | "package": "framework-sam-lora", 25 | "script": "builder/frameworks/baremetal.py" 26 | } 27 | }, 28 | "packages": { 29 | "toolchain-gccarmnoneeabi": { 30 | "type": "toolchain", 31 | "version": "=1.70201.0" 32 | }, 33 | "framework-sam-lora": { 34 | "type": "framework", 35 | "version": "https://github.com/Wiz-IO/framework-sam-lora" 36 | }, 37 | "tool-sam-lora": { 38 | "type": "uploader", 39 | "version": "https://github.com/Wiz-IO/LIB/raw/master/sam-lora/tool-sam-lora.zip" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Microchip Atmel SAMR34/35 platform for PlatformIO 2 | 3 | **Version 0.1.2** ( [look here, to see if there is something new](https://github.com/Wiz-IO/platform-sam-lora/wiki/VERSION) ) 4 | * OS Windows **( for now )** 5 | * * Baremetal 6 | * * Arduino ( in process... ) 7 | * Board [Microchip SAM R34 Xplained Pro](https://www.microchip.com/DevelopmentTools/ProductDetails/dm320111) 8 | * [Framework Source Codes and Examples](https://github.com/Wiz-IO/framework-sam-lora) 9 | * [Wiki ( read )](https://github.com/Wiz-IO/platform-sam-lora/wiki) 10 | 11 | The project is a work in progress and is very beta version - **there may be bugs** 12 | 13 | ## Baremetal 14 | * CMSIS 15 | * [ASF ( v 3.47.0.96 )](https://github.com/Wiz-IO/platform-sam-lora/wiki/ASF) 16 | * * [Example: LED Blink](https://github.com/Wiz-IO/framework-sam-lora/tree/master/examples/asf_blink) 17 | 18 | ## Arduino Core 19 | * Arduino core 20 | * GPIO, ADC, Serial, I2C, SPI, RF 21 | * LoRa & LoraWAN 22 | * Variant: Microchip SAM R34 Xplained Pro 23 | * * [Example: Hello World](https://github.com/Wiz-IO/framework-sam-lora/blob/master/examples/arduino_hello_world/) 24 | * * [Example: OLED from the screenshot](https://github.com/Wiz-IO/framework-sam-lora/tree/master/examples/arduino_oled_i2c) 25 | 26 | ![sam](https://raw.githubusercontent.com/Wiz-IO/LIB/master/images/sam34-oled.jpg) 27 | 28 | [The first steps - youtube](https://www.youtube.com/watch?v=Bhc3n0Go5KI) 29 | 30 | [Simple LoRa](https://www.youtube.com/watch?v=3bJiQ3b2fgA) 31 | 32 | ## Platform Installation 33 | 34 | Install VS Code + PlatformIO 35 | 36 | PlatformIO - Home - Platforms - Advanced Installation 37 | 38 | Paste link: https://github.com/Wiz-IO/platform-sam-lora 39 | 40 | ## Fast Uninstall 41 | Goto `C:\Users\USER_NAME\.platformio\platforms` and **delete**: 42 | * folder **sam-lora** ( builders ) 43 | * folder **framework-sam-lora** ( sources ) 44 | * folder **tool-sam-lora** ( uploader ) 45 | * folder **toolchain-gccarmnoneeabi** (compiler ) 46 | 47 | ![sam](https://raw.githubusercontent.com/Wiz-IO/LIB/master/images/lorawan-appdata.png) 48 | 49 | ## Baremetal INI 50 | ```ini 51 | [env:samr34xpro] 52 | platform = sam-lora 53 | board = samr34xpro 54 | framework = baremetal 55 | monitor_port = COMx 56 | monitor_speed = 115200 57 | ``` 58 | 59 | ## Arduino INI 60 | ```ini 61 | [env:samr34xpro] 62 | platform = sam-lora 63 | board = samr34xpro 64 | framework = arduino 65 | monitor_port = COMx 66 | monitor_speed = 115200 67 | ``` 68 | 69 | ## CUSTOM UPLOADERS 70 | The Platform use Microchip SAM R34 Xplained Pro with onboard EDBG uploader 71 | 72 | I don't have a J-LINK, Atmel ICE, stand alone modules and/or custom bootloaders to add more uploaders 73 | 74 | The code has a custom experimental "bootload" uploader and you can use it as an entry point for your experimental uploaders 75 | 76 | https://github.com/Wiz-IO/platform-sam-lora/blob/master/builder/frameworks/SAMR_FU.py 77 | 78 | 79 | The main upload entry function is: 80 | 81 | **dev_upload(target, source, env)** 82 | 83 | https://github.com/Wiz-IO/platform-sam-lora/blob/master/builder/frameworks/arduino-samr34.py#L14 84 | 85 | There are conditions for distinguishing the tool used - edit and test... 86 | 87 | 88 | Create new board, Copy/Paste/Rename and edit boards/samr34xpro.json as experimental board 89 | 90 | ## Road Map 91 | * Baremetal Uploaders ( now works with atbackend/atprogram ) 92 | * Baremetal ASF/CMSIS 93 | * Arduino Bootloader 94 | * Arduino Core 95 | * Arduino Libraries 96 | * Examples 97 | 98 | ## Thanks to 99 | 100 | * [Ivan Kravets ( PlatformIO )](https://platformio.org/) 101 | * Miguel Romani ( TheThings ) 102 | * [Comet Electronics](https://www.comet.bg/en/) 103 | 104 | 105 | >If you want to help / support: 106 | [![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ESUP9LCZMZTD6) 107 | --------------------------------------------------------------------------------