Giter Site home page Giter Site logo

ebiroll / dragino_lm502 Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 23.73 MB

This project provides an example for the dragino LM502 LoRaWAN module running on the demo board.

C 81.42% Python 1.97% Makefile 0.27% C++ 7.58% HTML 0.01% Perl 0.01% Objective-C 0.19% Assembly 1.64% Pawn 6.90% Shell 0.01%

dragino_lm502's Introduction

dragino_LM502

This project provides an example for the dragino LM502 LoRaWAN module running on the demo board.

board

Datasheet http://www.dragino.com/downloads/index.php?dir=LM502/

Demo board

The demo board contains an ST32F103C08TC running CMIS-DAP https://os.mbed.com/handbook/CMSIS-DAP and the LM502 module that contains a 32-Bit RISC MCU CY8C4147AXI-S445 https://www.cypress.com/part/cy8c4147axi-s445 from Cypres and a SX1262 https://www.semtech.com/uploads/documents/DS_SX1261-2_V1.1.pdf LoRa Modem

Builing

The official toolchain for the cypress MCU is PSOC creator.

I was hoping that it would be possible to use the generated sources with platfotm io, https://platformio.org/ However, this might not be so easy without adding custom startup files as we do not want the stm32 low_level init functions to run at startup.

Cypress MCU

The official IDE for the cypress MCU is PSOC creator. https://www.cypress.com/documentation/other-resources/psoc-creator-user-guide The PSOC creator uses a modified version of cmsis 5.0 https://developer.arm.com/tools-and-software/embedded/cmsis

copy the *.c and *.h files in the Generated directory as well as the cyapicallbacks.h file to src directory. Also add main.c

Debugging

The ST32F103 comes preflashed with cmsis-dap firmware but if you want to build your own, you could try this https://github.com/devanlai/dap42 , make sure you use the correct pins to connect to the LM502 SWD pins.

ST Pin Name Module pim
PA_4 SWD_CLK
PA_2 SWD_DATA
PA_9 RX1
PA_10 TX1

https://docs.platformio.org/en/latest/plus/debug-tools/cmsis-dap.html

Running in qemu

It seems like the linker scripts sets the correct reset handler, This means that we probably can use our platform-io build as it is.

emu-system-arm -nographic  -d unimp   -cpu cortex-m0 -machine cubieboard -kernel .pioenvs/demo_lm502/firmware.elf  -S -s

arm-none-eabi-gdb  .pioenvs/demo_lm502/firmware.elf
(gdb) target remote:1234
(gdb) where
#0  Reset () at src/Cm0plusStart.c:378

(gdb) b    cyfitter_cfg();
(gdb) b ClockSetup

Info

https://www.embedded.com/design/mcus-processors-and-socs/4026075/Building-Bare-Metal-ARM-Systems-with-GNU-Part-2

https://github.com/platformio/platformio-core/commit/1e21d6e05bbbeb0cc682eca9b0f1bc5e5e180b5f

~/.platformio/platforms/ststm32/builder/frameworks/cmsis.py

dragino_lm502's People

Contributors

ebiroll avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

ghsecuritylab

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.