ASF is generating not good project

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all, as you can see in this video: https://www.facebook.com/roberto... ASF is not working well and generate a code with errors that i don't understand and you can easily replicate on your computer, can someone explain how to remove this issue?
Thank you in advance to who answer

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

Posting a link to a Facebook page wont get you very far.  I did look and the video is so poor I cannot make out any of the text.  I did see an Arduino board at one point, but thats about it.

 

Can you explain what your project is, and what you were trying to do with ASF>  THat would be a big help

 

JIm

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is no magic thing that makes us see what you're seeing. If you want help diagnosing the problem you need to give us the facts. These, for a start:

 

1. Tell us, in detail, how you generated the project.

2. ZIP up the complete project directory tree and attach it to a post here.

3. Report version of ASF used.

4. Report version of Studio used.

5. Report version of avr-gcc used.

6. Show complete output of your failed build. After the build, switch to the Output tab, mark everything, copy it and paste into a post here.

Happy 75th anniversary to one of the best movies ever made! Rick Blane [Bogart]: "Of all the gin joints, in all the towns, in all the world, she walks into mine."

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:

There is no magic thing that makes us see what you're seeing. If you want help diagnosing the problem you need to give us the facts. These, for a start:

 

1. Tell us, in detail, how you generated the project.

2. ZIP up the complete project directory tree and attach it to a post here.

3. Report version of ASF used.

4. Report version of Studio used.

5. Report version of avr-gcc used.

6. Show complete output of your failed build. After the build, switch to the Output tab, mark everything, copy it and paste into a post here.

Ok, I state about this error that I found it on two different computers, the second attempt I did on a very clean installation after 20 minutes from the installation.
In the attachement the files of project,

asf version is: 3.35.1.898 , in the attachement the picture

atmel studio is version 7, picture too

i don't know how to see the version of avr-gcc but and as I tell i make a new installation from sckratch

this is the request output:

------ Build started: Project: GccApplication3, Configuration: Debug ARM ------
Build started.
Project "GccApplication3.cproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "C:\Users\rob77\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\GccApplication3.cproj" (target "Build" depends on it):
    Task "RunCompilerTask"
        Shell Utils Path C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils
        C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe all --jobs 8 --output-sync
        Building file: ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c
        Invoking: ARM/GNU C Compiler : 6.3.1
        In file included from C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\5.0.1\CMSIS\Include/cmsis_compiler.h:48:0,
                         from C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\5.0.1\CMSIS\Include/core_cm3.h:113,
                         from C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include/sam3x8e.h:253,
                         from C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include/sam3xa.h:44,
                         from ../src/ASF/sam/utils/header_files/io.h:75,
                         from ../src/ASF/sam/utils/compiler.h:67,
                         from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.h:60,
                         from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c:48:
C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\5.0.1\CMSIS\Include\cmsis_gcc.h(1350,6): warning: "__ARM_FEATURE_DSP" is not defined [-Wundef]
        "C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe"  -x c -mthumb -D__SAM3X8E__ -DDEBUG -DBOARD=ARDUINO_DUE_X -Dscanf=iscanf -DARM_MATH_CM3=true -Dprintf=iprintf -D__SAM3X8E__  -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\5.0.1\CMSIS\Include" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include" -I"../src/ASF/common/boards" -I"../src/ASF/sam/utils" -I"../src/ASF/sam/utils/header_files" -I"../src/ASF/sam/utils/preprocessor" -I"../src/ASF/thirdparty/CMSIS/Include" -I"../src/ASF/thirdparty/CMSIS/Lib/GCC" -I"../src/ASF/common/utils" -I"../src/ASF/sam/utils/cmsis/sam3x/source/templates" -I"../src/ASF/sam/utils/cmsis/sam3x/include" -I"../src/ASF/sam/boards" -I"../src/ASF/sam/boards/arduino_due_x" -I"../src/ASF/common/services/gpio" -I"../src/ASF/sam/drivers/pio" -I"../src/ASF/common/services/ioport" -I"../src/ASF/common/services/clock" -I"../src/ASF/sam/drivers/pmc" -I"../src" -I"../src/config"  -O1 -fdata-sections -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m3 -c -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -std=gnu99 -ffunction-sections -fdata-sections -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Wmain -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -Wshadow -Wbad-function-cast -Wwrite-strings -Wsign-compare -Waggregate-return  -Wmissing-declarations -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs -Wlong-long -Wunreachable-code -Wcast-align --param max-inline-insns-single=500 -MD -MP -MF "src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.d" -MT"src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.d" -MT"src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.o"   -o "src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.o" "../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c"
C:\Users\rob77\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\Debug\Makefile(262,1): error: recipe for target 'src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.o' failed
         #if (__ARM_FEATURE_DSP == 1)                             /* ToDo ARMCLANG: This should be ARCH >= ARMv7-M + SIMD */
              ^~~~~~~~~~~~~~~~~
        In file included from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c:48:0:
C:\Users\rob77\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\src\ASF\sam\utils\cmsis\sam3x\source\templates\system_sam3x.h(62,17): warning: redundant redeclaration of 'SystemCoreClock' [-Wredundant-decls]
         extern uint32_t SystemCoreClock; /* System Clock Frequency (Core Clock) */
                         ^~~~~~~~~~~~~~~
        In file included from C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include/sam3x8e.h:255:0,
                         from C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include/sam3xa.h:44,
                         from ../src/ASF/sam/utils/header_files/io.h:75,
                         from ../src/ASF/sam/utils/compiler.h:67,
                         from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.h:60,
                         from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c:48:
C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include\system_sam3xa.h(43,17): info: previous declaration of 'SystemCoreClock' was here
         extern uint32_t SystemCoreClock; /* System Clock Frequency (Core Clock) */
                         ^~~~~~~~~~~~~~~
        In file included from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c:48:0:
C:\Users\rob77\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\src\ASF\sam\utils\cmsis\sam3x\source\templates\system_sam3x.h(68,6): warning: redundant redeclaration of 'SystemInit' [-Wredundant-decls]
         void SystemInit(void);
              ^~~~~~~~~~
        In file included from C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include/sam3x8e.h:255:0,
                         from C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include/sam3xa.h:44,
                         from ../src/ASF/sam/utils/header_files/io.h:75,
                         from ../src/ASF/sam/utils/compiler.h:67,
                         from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.h:60,
                         from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c:48:
C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include\system_sam3xa.h(49,6): info: previous declaration of 'SystemInit' was here
         void SystemInit(void);
              ^~~~~~~~~~
        In file included from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c:48:0:
C:\Users\rob77\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\src\ASF\sam\utils\cmsis\sam3x\source\templates\system_sam3x.h(74,6): warning: redundant redeclaration of 'SystemCoreClockUpdate' [-Wredundant-decls]
         void SystemCoreClockUpdate(void);
              ^~~~~~~~~~~~~~~~~~~~~
        In file included from C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include/sam3x8e.h:255:0,
                         from C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include/sam3xa.h:44,
                         from ../src/ASF/sam/utils/header_files/io.h:75,
                         from ../src/ASF/sam/utils/compiler.h:67,
                         from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.h:60,
                         from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c:48:
C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include\system_sam3xa.h(55,6): info: previous declaration of 'SystemCoreClockUpdate' was here
         void SystemCoreClockUpdate(void);
              ^~~~~~~~~~~~~~~~~~~~~
        In file included from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c:48:0:
C:\Users\rob77\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\src\ASF\sam\utils\cmsis\sam3x\source\templates\system_sam3x.h(79,6): warning: redundant redeclaration of 'system_init_flash' [-Wredundant-decls]
         void system_init_flash(uint32_t ul_clk);
              ^~~~~~~~~~~~~~~~~
        In file included from C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include/sam3x8e.h:255:0,
                         from C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include/sam3xa.h:44,
                         from ../src/ASF/sam/utils/header_files/io.h:75,
                         from ../src/ASF/sam/utils/compiler.h:67,
                         from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.h:60,
                         from ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c:48:
C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAM3X_DFP\1.0.51\include\system_sam3xa.h(60,6): info: previous declaration of 'system_init_flash' was here
         void system_init_flash(uint32_t dw_clk);
              ^~~~~~~~~~~~~~~~~
        ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c: In function 'SystemInit':
C:\Users\rob77\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\src\ASF\sam\utils\cmsis\sam3x\source\templates\system_sam3x.c(70,32): error: implicit declaration of function 'CKGR_MOR_KEY' [-Werror=implicit-function-declaration]
         #define SYS_CKGR_MOR_KEY_VALUE CKGR_MOR_KEY(0x37) /* Key to unlock MOR register */
                                        ^
C:\Users\rob77\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\src\ASF\sam\utils\cmsis\sam3x\source\templates\system_sam3x.c(89,19): info: in expansion of macro 'SYS_CKGR_MOR_KEY_VALUE'
           PMC->CKGR_MOR = SYS_CKGR_MOR_KEY_VALUE | SYS_BOARD_OSCOUNT |
                           ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\rob77\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\src\ASF\sam\utils\cmsis\sam3x\source\templates\system_sam3x.c(89,3): warning: nested extern declaration of 'CKGR_MOR_KEY' [-Wnested-externs]
           PMC->CKGR_MOR = SYS_CKGR_MOR_KEY_VALUE | SYS_BOARD_OSCOUNT |
           ^~~
        ../src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.c: In function 'system_init_flash':
C:\Users\rob77\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\src\ASF\sam\utils\cmsis\sam3x\source\templates\system_sam3x.c(214,22): error: 'CHIP_FREQ_FWS_4' undeclared (first use in this function)
          } else if (ul_clk < CHIP_FREQ_FWS_4) {
                              ^~~~~~~~~~~~~~~
C:\Users\rob77\Documents\Atmel Studio\7.0\GccApplication3\GccApplication3\src\ASF\sam\utils\cmsis\sam3x\source\templates\system_sam3x.c(214,22): info: each undeclared identifier is reported only once for each function it appears in
        cc1.exe: some warnings being treated as errors
        make: *** [src/ASF/sam/utils/cmsis/sam3x/source/templates/system_sam3x.o] Error 1
    Done executing task "RunCompilerTask" -- FAILED.
Done building target "CoreBuild" in project "GccApplication3.cproj" -- FAILED.
Done building project "GccApplication3.cproj" -- FAILED.

Build FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

 

 

 

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i forgot to answer how i generate the project,
I start to file/new project then I select  GCC C Executable Project then clik ok
At the new window i select Device Family SAM3X and in the lillte window i select AtSAM3X8E (Arduino Due is equipped with this microcontroller)
then click OK and is generated a new project, if I try to compile this empty project is all well, then form menu ASF/ASF WIZARD appear this

 

 

 

 

 

I click ok and select arduino due and click Next

 

 

then i confirm clicking finish on this:

 

 

 

 

and read this warning and click apply:

 

 

so I removed the first main file generated in order to remain only the one generated by the ASF and recompile, and i try to merge the include and the routines of the removed main file in the new file but mthin change.
I hope this is sufficient to understando what is happening

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 i read from the output that the compiler is an ARM/GNU C Compiler : 6.3.1