element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Enchanted Objects
  • Challenges & Projects
  • Design Challenges
  • Enchanted Objects
  • More
  • Cancel
Enchanted Objects
Blog 1958 Turntable from the Black Forest - 11: Yelp - who can Help me to Compile and Run my First SAMA5D4 C Program
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 21 Apr 2015 2:56 PM Date Created
  • Views 1380 views
  • Likes 2 likes
  • Comments 14 comments
  • sama5d4
  • atmel_sama5d4
  • yelp
  • help
  • enchanted_player
  • enchanted_objects
  • atmel
Related
Recommended

1958 Turntable from the Black Forest - 11: Yelp - who can Help me to Compile and Run my First SAMA5D4 C Program

Jan Cumps
Jan Cumps
21 Apr 2015

image

 

 

Request for Help to Load and Run one of the sama5d4x_xplained_softpack examples

 

Success: compiling the libraries from sama5d4x_xplained_softpack

 

I have installend a GNU Cross Compilation toolset on Windows 8.x. And I can successfully compile the libraries of sama5d4x_xplained_softpack_1.2_for_CodeSourcery_201410.

I build them from the make files, and I have the compiled debug and release versions of each library in the lib folder.

 

image

 

Fail: compiling the examples from sama5d4x_xplained_softpack

 

Once I go one step further and try to compile the examples, I get into errors. 132 of them.

Here's the start and end section of my log. The whole output is attached to the blog

 

16:43:44 **** Build of configuration Default for project Z_examples getting-started ****
make all
arm-none-eabi-gcc -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Werror-implicit-function-declaration -Wmain -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs  -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -Wredundant-decls -Wnested-externs -Winline -Wlong-long -Wunreachable-code -Dprintf=iprintf -mcpu=cortex-a5 -ffunction-sections -g  -I../../../../libraries/libchip_sama5d4x -I../../../../libraries/libboard_sama5d4x-Xplained -I../../../../libraries -Dsama5d4x -DTRACE_LEVEL=4 -Dsram -c -o obj/sram_main.o ../../main.c
../../main.c: In function 'TC0_IrqHandler':
../../main.c:294:23: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
     volatile uint32_t dummy;
                       ^
arm-none-eabi-gcc -L../../../../libraries/libchip_sama5d4x/lib -L../../../../libraries/libboard_sama5d4x-Xplained/lib -L=/lib -L=/../lib/gcc/arm-none-eabi/4.4.1 -mcpu=cortex-a5 -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=entry -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--print-gc-sections -Wl,--stats -T"../../../../libraries/libboard_sama5d4x-Xplained/resources/gcc/sama5d4x/sram.ld" -Wl,-Map,bin/getting-started-sram.map -o bin/getting-started-sram.elf obj/sram_main.o -Wl,--start-group -lgcc -lc -lchip_sama5d4x_gcc_rel -lboard_sama5d4x_Xplained_gcc_rel -Wl,--end-group
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.data' in file 'c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/armv7-ar/thumb/crtbegin.o'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.text' in file 'c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-ar/thumb/crt0.o'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.ARM.exidx' in file 'c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-ar/thumb/crt0.o'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.ARM.attributes' in file 'c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-ar/thumb/crt0.o'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.text.exit' in file 'c:\program files (x86)\gnu tools arm embedded\4.9 2015q1\bin\../arm-none-eabi/lib\libc.a(lib_a-exit.o)'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.debug_frame' in file 'c:\program files (x86)\gnu tools arm embedded\4.9 2015q1\bin\../arm-none-eabi/lib\libc.a(lib_a-exit.o)'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.ARM.attributes' in file 'c:\program files (x86)\gnu tools arm embedded\4.9 2015q1\bin\../arm-none-eabi/lib\libc.a(lib_a-exit.o)'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.text._iprintf_r' in file 'c:\program files (x86)\gnu tools arm embedded\4.9 2015q1\bin\../arm-none-eabi/lib\libc.a(lib_a-iprintf.o)'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.text.__sprint_r' in file 'c:\program files (x86)\gnu tools arm embedded\4.9 2015q1\bin\../arm-none-eabi/lib\libc.a(lib_a-vfiprintf.o)'

...


c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.text.PIO_DisableWriteProtect' in file '../../../../libraries/libchip_sama5d4x/lib\libchip_sama5d4x_gcc_rel.a(pio.o)'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.text.PIO_GetWriteProtectViolationInfo' in file '../../../../libraries/libchip_sama5d4x/lib\libchip_sama5d4x_gcc_rel.a(pio.o)'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.text.PIO_Output_Low' in file '../../../../libraries/libchip_sama5d4x/lib\libchip_sama5d4x_gcc_rel.a(pio.o)'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.eh_frame' in file 'c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/armv7-ar/thumb/crtend.o'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.jcr' in file 'c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/armv7-ar/thumb/crtend.o'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: Removing unused section '.ARM.attributes' in file 'c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/armv7-ar/thumb/crtend.o'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: total time in link: 0.062000
arm-none-eabi-nm bin/getting-started-ddram.elf >bin/getting-started-ddram.elf.txt
arm-none-eabi-objcopy -O binary bin/getting-started-ddram.elf bin/getting-started-ddram.bin
arm-none-eabi-size obj/ddram_main.o bin/getting-started-ddram.elf
   text   data    bss    dec    hex filename
   1520      2      4   1526    5f6 obj/ddram_main.o
  31412      0  22428  53840   d250 bin/getting-started-ddram.elf


16:43:49 Build Finished (took 4s.303ms)

 

That's where I am at the moment. Something tells me I'm close. But then again, maybe not image.

It would be great if you could give me a nod in the right direction.

 

My intermediate goal is to be able to run a headless C program on the board, with or without linux. I'm happy if I can say "hello, world!".

 

 

Table of Contents
Chapter 1: Fix the turntable
1: Perpetuum Ebner Musical 1
2: A Time to Kill and a Time to Heal
3: Preparation for Motor Drive
4: Motor control with Infineon Motor Shield and Arduino UNO
5: Turntable speed sample testbed with Arduino UNO
6: Turntable Speed Sensor design
7: Control Theory - End of Chapter 1
Chapter 2: First Enchantments
8: Digital Light Organ Enchantment
9: Autonomous Servo Lift
10: SMD Time - Solder the IR Speed Sensor PCB
11: Yelp - who can Help me to Compile and Run my First SAMA5D4 C Program
12: Son et Lumiere - End of Chapter 2
Chapter 3: Taming the Board
13: Breakthrough - Run my own C++ Program on the SAMA5D4
14: Digital Light Organ Input Buffer
15: SAMA5D4 Blinky
16: Scope Creep
17: Audio Sampling with 16-bit ADC ADS8343
18: Sending Files to SAMA5D4 over USB
19: Port my Light Organ from Arduino to SAMA5D4
20: Fast Fourier Transform on the SAMA5D4 - End of Chapter 3
Epilogue: Reaching for the Clouds
21: Right-Sizing my Plans
22: My Own C++ Buffered Sampler on the SAMA5D4
Interlude
23: Building In the Motorized Light Organ
24: Up to the Clouds with Yún
25: Publish or Perish
26: Turntable Finished
Stretch & Boni
Bonus 1a: Remote Light Organ with WiFI pt. 1
Bonus 1b: Remote Light Organ with WiFI pt. 2
Grande Finale: Paho MQTT Client on the SAMA5D4
Related blog
Vintage Turntable repair: Can I fix a Perpetuum Ebner from 1958
Review 1: Atmel SMART SAMA5D4 Xplained Ultra Unboxing and First Steps
Review 2: Atmel SMART SAMA5D4 Xplained Ultra - Building the Libraries from Source
Review 3: Digital Continuous Rotation (360°) Servo Part 1
Review 4: Digital Continuous Rotation (360°) Servo Part 2
Review 5: Atmel SMART SAMA5D4 Xplained Ultra - TCP/IP running
Review 6: Atmel SMART SAMA5D4 Xplained Ultra - LINUX Distro with SSH support
poem
Enchanted Objects: Let's work together to tame the ATMEL SMART SAMA5D4 Xplained Ultra kit
17 bis: Off South...
Review 7: Atmel SMART SAMA5D4 Xplained Ultra - C++ ADC Example on Linux
Review 8: Atmel SMART SAMA5D4 Xplained Ultra - Product Review
Review 9a: Atmel SMART SAMA5D4 Xplained Ultra - Set up ADC Buffer with Hardware Trigger Part 1
Review 9b: Atmel SMART SAMA5D4 Xplained Ultra - Set up ADC Buffer with Hardware Trigger Part 2
Review 10: Atmel SMART SAMA5D4 Xplained Ultra - New Content on AT91.com
1958 Turntable from the Black Forest - Summary of the Enchanted Player Story
Attachments:
z_examples_getting_started.txt.zip
  • Sign in to reply

Top Comments

  • clem57
    clem57 over 10 years ago +1
    Does the cross compiled version on Windows run on the board? Clem
  • pettitda
    pettitda over 10 years ago +1
    Looks like the build was successful to me. The executable binary files are listed in the text output. They are getting-started-ddram.elf, getting-started-ddram.bin, getting-started-sram.elf, and getting…
  • pettitda
    pettitda over 10 years ago in reply to Jan Cumps +1
    I know for sure that those are your binary files. However, I haven't loaded one manually before. Have you tried the following from Eclipse: Create, manage and run configurations ----------------------…
  • Jan Cumps
    Jan Cumps over 10 years ago in reply to pettitda

    I'll re-redo with DS-5. I've got both installed...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • pettitda
    pettitda over 10 years ago

    Are you using Eclipse DS-5 or a vanilla version of Eclipse?  It appears those instructions were for the DS-5 package.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 10 years ago

    It would be great if someone who knows how to correctly load a cross-compiled 'sama5d4x_xplained_softpack' example build to the board with SAM-BA could chime in.

    I'm going to re-explore the steps on the internet in the mean time.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 10 years ago

    All attempts to load bin to the board and run have failed via that method using eclipse. Maybe I didn't connect the board the right way to my PC or to the network.

    I don't know that at this point. From this point on '   - Select "Standard Create Process Launcher"' I had to improvise because that option isn't available.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 10 years ago in reply to pettitda

    - Click "Select other..." to select preferred launcher.

       - Select "Standard Create Process Launcher"

    The Standard Create Process Launcher is not available in my installation:

    image

     

    The closest launcher that has similar properties was the 'Legacy remote...' one.

    I configured it and ran. It hangs at 57% when launching:

    image

     

    I have connected the board via the debug USB port, it's assigned COM17. I don't know if that is correct.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube