Giter Site home page Giter Site logo

Comments (3)

Optoneer avatar Optoneer commented on June 18, 2024

Today I see after opening the project, that it is unable to resolve the configuration for avr-gcc.exe and it would use a MinGW-gcc.exe. This does not pop up when opening the attiny1626 project.

What I continued to try - without success:

  • I removed the .platformio folder in order to get a fresh installation.
  • I checked, that the latest DFP is in .platformio\packages\toolchain-atmelavr\avr\include\avr\iotn3227.h
  • I changed the target to 3217 in the platformio.ini and this compiles just fine

Any ideas?

from platform-atmelmegaavr.

Optoneer avatar Optoneer commented on June 18, 2024

Got it. Platformio does not include the necessary include files. If anyone faces this issue, too:

  1. Download DFP (Device Family Pack) from Atmel Homepage (Rename to *.zip and extract somewhere)
  2. Ensure that <USER>\.platformio\packages\toolchain-atmelavr\avr\include\avr\io.h contains the #include for the correct header file.
#elif defined (__AVR_ATtiny3227__)
#  include <avr/iotn3227.h>
  1. header file
    • Copy <DFP-pack>\include\avr\iotn3227.h to
    • <USER>\.platformio\packages\toolchain-atmelavr\avr\include\avr\iotn3227.h
  2. archive file .a and startup file crt.o
    • Copy <DFP-pack>\gcc\dev\attiny3227\avrxmega3\libattiny3227.a and crtattiny3227.o to
    • <USER>\.platformio\packages\toolchain-atmelavr\avr\lib\
  3. specs file
    • Copy <DFP-pack>\gcc\dev\attiny3227\device-specs\specs-attiny3227 to
    • <USER>\.platformio\packages\toolchain-atmelavr\lib\gcc\avr\7.3.0\device-specs\

It starts to compile, but I get a compile error. I think, it is because it is not well tested and the vendor Microchip has not yet completely updated their include files, i.e. using the same names everywhere ...

My issue was with the CLK-Sel. I changed the device header file <USER>\.platformio\packages\toolchain-atmelavr\avr\include\avr\iotn3227.h like this:

/* Clock Select */
typedef enum TCB_CLKSEL_enum
{
    TCB_CLKSEL_DIV1_gc = (0x00<<1),  /* CLK_PER */
    TCB_CLKSEL_DIV2_gc = (0x01<<1),  /* CLK_PER/2 */
    TCB_CLKSEL_TCA0_gc = (0x02<<1),  /* Use CLK_TCA from TCA0 */
    TCB_CLKSEL_EVENT_gc = (0x07<<1)  /* Count on event edge */
} TCB_CLKSEL_t;

changed to

/* Clock Select */
typedef enum TCB_CLKSEL_enum
{
    TCB_CLKSEL_CLKDIV1_gc = (0x00<<1),  /* CLK_PER */
    TCB_CLKSEL_CLKDIV2_gc = (0x01<<1),  /* CLK_PER/2 */
    TCB_CLKSEL_CLKTCA0_gc = (0x02<<1),  /* Use CLK_TCA from TCA0 */
    TCB_CLKSEL_EVENT_gc = (0x07<<1)  /* Count on event edge */
} TCB_CLKSEL_t;

from platform-atmelmegaavr.

Optoneer avatar Optoneer commented on June 18, 2024

Close

from platform-atmelmegaavr.

Related Issues (20)

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.