Jump to content
Berry

Using Energia with a custom board (CC3220MODASF)

Recommended Posts

I'd like to use Energia with my custom board that has the CC3220MODASF MCU on it.  Can someone please provide step-by-step instructions on the steps required to have my custom board show up in the "Boards" in the Energia menu and the required edits to make it usable ? I've done quite a bit of online research and in this forum and found bits and pieces but nothing complete. From this ticket and others I found, putting the pieces together, I believe this is the correct partial course of action:

 

1.  Install the corresponding Launch Pad board in Energia (CC3220SF_LAUNCHXL) --> DONE

2. Go to "....\AppData\Local\Energia15\packages\energia\hardware\cc3220emt\5.6.2" 

3. Edit "boards.txt" , copy the entry for the board of interest and replicate for the custom board after renaming , ie:

 

Took this one:
CC3220SF-LAUNCHXL.name=CC3220SF-LAUNCHXL (80MHz)
CC3220SF-LAUNCHXL.upload.maximum_size=262144
CC3220SF-LAUNCHXL.build.mcu=cortex-m4
CC3220SF-LAUNCHXL.build.f_cpu=80000000L
CC3220SF-LAUNCHXL.build.core=cc3220emt
CC3220SF-LAUNCHXL.build.variant=CC3220SF_LAUNCHXL
CC3220SF-LAUNCHXL.build.ldscript=linker.cmd
CC3220SF-LAUNCHXL.build.board=CC3220SF_LAUNCHXL
CC3220SF-LAUNCHXL.build.mcu=cortex-m4
CC3220SF-LAUNCHXL.upload.tool=dslite
CC3220SF-LAUNCHXL.upload.protocol=dslite

 

and created this one:

CC3220SF-LAUNCHXL.name=CC3220SF_CUSTOM_BOARD --> renamed 
CC3220SF-LAUNCHXL.upload.maximum_size=262144
CC3220SF-LAUNCHXL.build.mcu=cortex-m4
CC3220SF-LAUNCHXL.build.f_cpu=80000000L
CC3220SF-LAUNCHXL.build.core=cc3220emt
CC3220SF-LAUNCHXL.build.variant=CC3220SF_CUSTOM_BOARD --> renamed 
CC3220SF-LAUNCHXL.build.ldscript=linker.cmd
CC3220SF-LAUNCHXL.build.board=CC3220SF_CUSTOM_BOARD--> renamed 
CC3220SF-LAUNCHXL.build.mcu=cortex-m4
CC3220SF-LAUNCHXL.upload.tool=dslite
CC3220SF-LAUNCHXL.upload.protocol=dslite

 

5. In the "variants" folder, I created a copy of the "CC3220SF_LAUNCHXL/" and named "CC3220SF_CUSTOM_BOARD"

 

I'm not sure what to do after this step. I know I have to do some pin mapping/edits, but not where where/how. 

 

My questions are:

A. Are the steps above correct? 

 

B.  After this, opening up Energia, I know see "CC3220SF_CUSTOM_BOARD" but no longer see "CC3220SF_LAUNCHXL". Why is that? Isn't this supposed to leave CC3220SF_LAUNCHXL and just add "CC3220SF_CUSTOM_BOARD"?

 

C. In the "CC3220SF_CUSTOM_BOARD/" folder, is "pins_energia.h" the only file I need to edit? The current contents are

Quote

static const uint8_t RED_LED = 29;
static const uint8_t GREEN_LED = 10;  /* same as pin 40 */
static const uint8_t BLUE_LED = 10; /* mapped to same as GREEN_LED */
static const uint8_t YELLOW_LED = 9;  /* same as pin 39  */

static const uint8_t PUSH1 = 3;
static const uint8_t PUSH2 = 11;

static const uint8_t SDA = 10;
static const uint8_t SCL = 9;

static const uint8_t MOSI = 15;
static const uint8_t MISO = 14;
static const uint8_t SCK  = 7;

static const uint8_t A0 = 23;
static const uint8_t A1 = 25;
static const uint8_t A2 = 26;
static const uint8_t A3 = 24;

D. There's also the "pins.c" file. It looks like I have to edit that file as well? If so, I'm not sure how to edit these and what keyword I need to use instead of "PIN_FUNC_UNUSED"? The current contents are:

Quote

 PIN_FUNC_UNUSED,    /*  dummy */
    PIN_FUNC_UNUSED,    /*  1  - 3.3V */
    PIN_FUNC_UNUSED,    /*  2  - GPIO_03 */
    PIN_FUNC_UNUSED,    /*  3  - GPIO_13 */
    PIN_FUNC_UNUSED,    /*  4  - GPIO_12 */
    ...
    PIN_FUNC_UNUSED,    /*  28 - GPIO_30 */
    PIN_FUNC_UNUSED,    /*  29 - GPIO_09 */
   ...

E. Can someone explain how the "pins.c" and "pins_energia.h" relate to each other? For example, how does this line in "pins_energia.h":

"static const uint8_t RED_LED = 29;"

relate to the same pin number in  "pins.c" file? Pin 29 in that file shows it's unused:

"    PIN_FUNC_UNUSED,    /*  29 - GPIO_09 */"

 

I'm using: energia-1.8.10E23 and I have the XDS110 standalone programmer, which I plan to use with Energia to program my custom board. 

Thanks!
Berry

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...