Giter VIP home page Giter VIP logo

platform-sam-lora's Introduction

Microchip Atmel SAMR34/35 platform for PlatformIO

Version 0.1.2 ( look here, to see if there is something new )

The project is a work in progress and is very beta version - there may be bugs

Baremetal

Arduino Core

sam

The first steps - youtube

Simple LoRa

Platform Installation

Install VS Code + PlatformIO

PlatformIO - Home - Platforms - Advanced Installation

Paste link: https://github.com/Wiz-IO/platform-sam-lora

Fast Uninstall

Goto C:\Users\USER_NAME\.platformio\platforms and delete:

  • folder sam-lora ( builders )
  • folder framework-sam-lora ( sources )
  • folder tool-sam-lora ( uploader )
  • folder toolchain-gccarmnoneeabi (compiler )

sam

Baremetal INI

[env:samr34xpro]
platform = sam-lora
board = samr34xpro
framework = baremetal
monitor_port = COMx     
monitor_speed = 115200  

Arduino INI

[env:samr34xpro]
platform = sam-lora
board = samr34xpro
framework = arduino
monitor_port = COMx     
monitor_speed = 115200  

CUSTOM UPLOADERS

The Platform use Microchip SAM R34 Xplained Pro with onboard EDBG uploader

I don't have a J-LINK, Atmel ICE, stand alone modules and/or custom bootloaders to add more uploaders

The code has a custom experimental "bootload" uploader and you can use it as an entry point for your experimental uploaders

https://github.com/Wiz-IO/platform-sam-lora/blob/master/builder/frameworks/SAMR_FU.py

The main upload entry function is:

dev_upload(target, source, env)

https://github.com/Wiz-IO/platform-sam-lora/blob/master/builder/frameworks/arduino-samr34.py#L14

There are conditions for distinguishing the tool used - edit and test...

Create new board, Copy/Paste/Rename and edit boards/samr34xpro.json as experimental board

Road Map

  • Baremetal Uploaders ( now works with atbackend/atprogram )
  • Baremetal ASF/CMSIS
  • Arduino Bootloader
  • Arduino Core
  • Arduino Libraries
  • Examples

Thanks to

If you want to help / support:
paypal

platform-sam-lora's People

Contributors

pfeerick avatar wiz-io avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

platform-sam-lora's Issues

Error creating project

Installation of platform-sam-lora goes fine, but when I create new project, I got error.

PIO Core Call Error: "The following files/directories have been created in /Users/user/Documents/PlatformIO/Projects/samr34
include - Put project header files here
lib - Put project specific (private) libraries here
src - Put project source files here
platformio.ini - Project Configuration File
Resolving samr34xpro dependencies...
Tool Manager: Installing https://github.com/Wiz-IO/LIB/raw/master/sam-lora/tool-sam-lora.zip
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Tool Manager: [email protected] has been installed!
Already up-to-date.
Updating metadata for the vscode IDE...


UserSideException: Processing samr34xpro (platform: sam-lora; board: samr34xpro; framework: arduino)
--------------------------------------------------------------------------------
Tool Manager: Installing https://github.com/Wiz-IO/LIB/raw/master/sam-lora/tool-sam-lora.zip
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Tool Manager: [email protected] has been installed!
Verbose mode can be enabled via `-v, --verbose` option
<<<<<<<<<<<< MICROCHIP ATSAMR34 XPLAINED PRO (S) 2019 Georgi Angelov >>>>>>>>>>>>
CONFIGURATION: https://docs.platformio.org/page/boards/sam-lora/samr34xpro.html
PLATFORM: Microchip SAMR34 SAMR35 (0.1.2+sha.1b2eeda) > Microchip ATSAMR34 Xplained Pro (S)
HARDWARE: SAMR34J18B 39.06KB RAM, 250KB Flash
PACKAGES: 
 - framework-sam-lora @ 1.0.0+sha.4a9c626 
 - toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)
TypeError: expected str, bytes or os.PathLike object, not NoneType:
 File \"/Users/user/.platformio/penv/lib/python3.11/site-packages/platformio/builder/main.py\", line 173:
 env.SConscript(\"$BUILD_SCRIPT\")
 File \"/Users/user/.platformio/packages/tool-scons/scons-local-4.6.0/SCons/Script/SConscript.py\", line 609:
 return _SConscript(self.fs, *files, **subst_kw)
 File \"/Users/user/.platformio/packages/tool-scons/scons-local-4.6.0/SCons/Script/SConscript.py\", line 279:
 exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
 File \"/Users/user/.platformio/platforms/sam-lora/builder/main.py\", line 30:
 elf = env.BuildProgram()
 File \"/Users/user/.platformio/packages/tool-scons/scons-local-4.6.0/SCons/Util/envs.py\", line 251:
 return self.method(*nargs, **kwargs)
 File \"/Users/user/.platformio/penv/lib/python3.11/site-packages/platformio/builder/tools/piobuild.py\", line 61:
 env.ProcessProgramDeps()
 File \"/Users/user/.platformio/packages/tool-scons/scons-local-4.6.0/SCons/Util/envs.py\", line 251:
 return self.method(*nargs, **kwargs)
 File \"/Users/user/.platformio/penv/lib/python3.11/site-packages/platformio/builder/tools/piobuild.py\", line 121:
 env.BuildFrameworks(env.get(\"PIOFRAMEWORK\"))
 File \"/Users/user/.platformio/packages/tool-scons/scons-local-4.6.0/SCons/Util/envs.py\", line 251:
 return self.method(*nargs, **kwargs)
 File \"/Users/user/.platformio/penv/lib/python3.11/site-packages/platformio/builder/tools/piobuild.py\", line 347:
 SConscript(env.GetFrameworkScript(name), exports=\"env\")
 File \"/Users/user/.platformio/packages/tool-scons/scons-local-4.6.0/SCons/Script/SConscript.py\", line 673:
 return method(*args, **kw)
 File \"/Users/user/.platformio/packages/tool-scons/scons-local-4.6.0/SCons/Script/SConscript.py\", line 609:
 return _SConscript(self.fs, *files, **subst_kw)
 File \"/Users/user/.platformio/packages/tool-scons/scons-local-4.6.0/SCons/Script/SConscript.py\", line 279:
 exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
 File \"/Users/user/.platformio/platforms/sam-lora/builder/frameworks/arduino.py\", line 17:
 m.dev_init(env, platform)
 File \"/Users/user/.platformio/platforms/sam-lora/builder/frameworks/arduino-samr34.py\", line 32:
 env.tool_dir = join(env.PioPlatform().get_package_dir(\"tool-sam-lora\"))
 File \"<frozen posixpath>\", line 76:
 
========================== [FAILED] Took 0.62 seconds =========================="

Modify the builder / uploader for alternative programmers

Hello everyone,
I have tried various cores for the SAM R34, but I like this very much because it supports PlatformIO, which is great.

A large disadvantage is that it only works with the EDBG chip found on the Xplained Pro board, but not on most custom implementations of the chip.

The question is, what would it take to modify the uploader script to make this work with either Jlink or with a UF2 bootloader? I'm assuming that the compilation wouldn't need to be changed. Can you point me to any resources that guide on how to do this? I'm willing to do this and also have other developers to do this, but we're struggling to find the resources. Thanks.

Support AU_915

Hello, congratulations on the project.

I am working on a project with the frequency AU_915. I would like to contribute the necessary changes for it in Beelan-LoRaWAN, but I confess that I'm a little lost and I didn't understand the relationship between the values of the sequences of defines with the frequencies.

typedef enum {
#if defined(US_915)
    SF10BW125   = 0x00,
    SF9BW125    = 0x01,
    SF8BW125    = 0x02,
    SF7BW125    = 0x03,
    SF8BW500    = 0x04,
    SF12BW500   = 0x08,
    SF11BW500   = 0x09,
    SF10BW500   = 0x0A,
    SF9BW500    = 0x0B,
    SF7BW500    = 0x0D
#elif defined(EU_868)
    SF12BW125   = 0x00,
    SF11BW125   = 0x01,
    SF10BW125   = 0x02,
    SF9BW125    = 0x03,
    SF8BW125    = 0x04,
    SF7BW125    = 0x05,
    SF7BW250    = 0x06
#endif
} dataRates_t;

I'm working with this for changes.
AU915-928
Uplink:

916.8 - SF7BW125 to SF10BW125
917.0 - SF7BW125 to SF10BW125
917.2 - SF7BW125 to SF10BW125
917.4 - SF7BW125 to SF10BW125
917.6 - SF7BW125 to SF10BW125
917.8 - SF7BW125 to SF10BW125
918.0 - SF7BW125 to SF10BW125
918.2 - SF7BW125 to SF10BW125
917.5 SF8BW500

Downlink:
923.3 - SF7BW500 to SF12BW500
923.9 - SF7BW500 to SF12BW500
924.5 - SF7BW500 to SF12BW500
925.1 - SF7BW500 to SF12BW500
925.7 - SF7BW500 to SF12BW500
926.3 - SF7BW500 to SF12BW500
926.9 - SF7BW500 to SF12BW500
927.5 - SF7BW500 to SF12BW500

Can you please help me on this most basic point?

WLR089 Xplained Pro, PlatformIO, Arduino, not work

Hi
I have WLR089 Xplained Pro Kit, working with framework arduino, build without errors, upload normally, but not running in WLR089 Xplained Pro, not print serial, not blink LED onboard, nothing works.

But if I make code in Microchip Studio run perfectly.

Does anyone have any solution for this problem?

SAMR34 , Platform IO Hex/bin/elf does not work with custom board

Hello Everyone ,
I am new for Platform IO.
I have SAMR34 Xplained Pro Evaluation Kit and program run perfect with inbuilt EDBG chip with platform IO with Visual code studio.
Now i will load same hex in custom board with j-link EDU from atmel studio then SAMR34 not initiated . But if I make sample code in ATMEL studio then hardware run perfect.
So let me know the solution which i have made in SAMR34 Xplained Pro Evaluation Kit and how can i load that hex file in Custom developed board to make it run.

@pfeerick please check .

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.