Shop OBEX P1 Docs P2 Docs Learn Events
Mobo MoBoStamp-pe motherboard - programming the co - processor — Parallax Forums

Mobo MoBoStamp-pe motherboard - programming the co - processor

InteractInteract Posts: 79
edited 2007-11-19 20:40 in BASIC Stamp
On the MoBoStamp-pe , I would like to change the supplied firmware for the Amtel co-processors.
I have AVR studio 4, And downloaded the·3 files from parallax·:
·
28300-gpio3.hex
gpio3.asm·
BSIMACROS.INC
·
I can't seem to be able to open gpio3.asm directly with AVR studio. I don't really know how the BSIMACROS.INC include file gets added, Copy paste just gets me a long list of errors. I am familiar with similar programming environments,·just looking for the quick answer·since this is such a single purpose build and will be done the same every time I want to change the firmware.·
I just don't see how to open the project / Assembly in AVR studio. I know I could figure it out eventually by reading there lit, but it would really cut down a lot of time if someone could get me the steps to load the original program into AVR studio and then build it to the correct file to be ready to export to the MoBo?·· Phil? then I could make my mods and be done with it.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-11-19 18:55
    I'm glad to see someone is ready to do some coprocessor programming! AVR Studio is a project-based assembler. To use it, you first have to set up a project, which entails naming the source files it includes, identifying the assembler and what chip it's for, etc. Here are the steps I recommend:

    1. To be consistent with the setup I used, create a directory structure like this: c:\jobs\avr\.
    2. Copy the file BSIMACROS.INC file to that directory.
    3. Create a new subdirectory under c:\jobs\avr\ and call it, for example, mygpio.
    4. Copy the file gpio3.asm to mygpio and rename it mygpio.asm.
    5. Open AVR Studio.
    6. Click Project -> Project Wizard.
    7. Click New Project.
    8. Click Atmel AVR Assembler, and fill in the text boxes and check boxes as shown below:

    attachment.php?attachmentid=50543

    9. Click Next >>.
    10. Click AVR Simulator, and select ATtiny13 under device.
    11. Click Finish.

    Now your new project should open. You can hit F7 to build it and create the hex file.

    I have to admit, the AVR project creation is a pain. Once you do it, though, with a consistent directory structure, it's not so bad the next time around. I recommend (having learned the hard way) creating a new subdirectory each time you do a new project or have a major version change. Otherwise, things can get rather tangled.

    -Phil
    599 x 348 - 21K
  • InteractInteract Posts: 79
    edited 2007-11-19 20:05
    THANKS!
    It did build with 2 warnings and no errors.

    AVR studio generates 6 files in association with the project and the build, seems a bit ecssesive, and I can see where if a lot of AVR projects were going on, file managment would get a bit hairy.

    Thanks again
  • InteractInteract Posts: 79
    edited 2007-11-19 20:10
    AND..

    what is the BSIMACRO.INC file?

    is that from·Amtel, or is it created by AVR studio, or is it·writen by the the programmer.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-11-19 20:25
    The BSIMACROS.INC file contains macros that can be used in your source code. Being more experienced with the PIC and SX in the beginning of my AVR programming, I missed things like DJNZ, so I created macros that let me continue using them. They're not documented or supported. But by examining their definitions, you should be able to figure out what they do. You'll need an INCLUDE directive in your source code (like the one in GPIO3.asm) to use them.

    -Phil
  • InteractInteract Posts: 79
    edited 2007-11-19 20:40
    Yup, seeing that now, I'll stop asking questions for now since I got the jump-start I needed.
    Thanks again
Sign In or Register to comment.