Add new platform - Quectel


#1

Hi there,

I make this for Arduino IDE


How to add to PlatformIO?


#2

Hi Georgi,

See

Do you have toolchains for macOS, Windows, and Linux? We can host them at https://bintray.com/platformio/dl-packages


#3

Hi Ivan,
Thanks for answer

I link platform, now I will “fight” with python scripts :slight_smile:

IF … I will ask


#4

It should be easy. I would be glad to help here with any questions. Atmel AVR + Arduino framework is a good example.


#5

thanks…
Quectel modules is ARM - Mediatek,
Samsung Artik is close to me


#6

little help?

folder_builder - main.py
    m66.py
    mc60.py
    bc66.py
   other_board.py - I use this for this question


(main.py)   
... 
elf = env.BuildProgram() ### this call other_board.py
src = env.ElfToBin( join("$BUILD_DIR", "src_file_name"), elf ) ### builder is append in other_board.py
env.GFH("src_file_name") ### THIS ADD HEADER TO BIN FILE 
Default(src)    

(other_board.py)
...
def makeHeader(src_file_name):
    file = = open(...)
    file.write(header array)... blah blah
    file.close()

env.Append(
....
        GFH=Builder(
            action=makeHeader
        ) 
)

The question is:
How to append builder GFH as function makeHeader(s_name) in other_board.py ?


#7

Could you share your code on Github and post link here?


#8

I want to add Quectel OpenCPU to PlatformIO ( as my tutorial for PlatformIO first)

main.py

####################################################

Target: Build executable and linkable program

####################################################
elf = env.BuildProgram() ### run cores/board.py
src = env.ElfToBin( join("$BUILD_DIR", “program”), elf )
env.GFH(“program”) # I want to call makeHeader() from bc66.py
Default(src)


#9

Short description:

Quectel OpenCPU is:
Native C application for Quectel GSM modules
It is simple functions API to Mediatek core in gsm module
OpenCPU is available for modules:
GPRS: M72, M95, M66, MC60
LTE NB/CAT M1: BC66

OpenCPU support modules peripherals as uart, spi, i2c, gpio, gsm, gprs, network, tcp/ip … etc

C user code is GCC compiled to ELF, ELF2BIN,
To BIN file is added Mediatek header (some bytes as bin file size) at the begining
then bin file is uploaded to module

I want to separate modules to platform … for PlatformIO as my tutorial, next will make and add Arduino cores…

sorry for my “good” English


#10

Do you need to apply patching after firmware is built? It’s better to do that with PostActions. See https://docs.platformio.org/en/latest/projectconf/advanced_scripting.html#before-pre-and-after-post-actions

env.AddPostAction("$BUILD_DIR/${PROGNAME}.hex", callback...)