View previous topic :: View next topic |
Author |
Message |
389292 Guru
Joined: 26 Mar 2019 Posts: 504
|
Posted: Sat Apr 04, 2020 3:30 pm Post subject: crossdev for avr |
|
|
I need to compile the firmware for teensy based keyboard. I installed crossdev, but when I do something like
Code: | USE="-openmp -hardened -sanitize -vtv" crossdev -s4 --portage --verbose --target avr |
it spits
Code: | * error: please convert //etc/portage/package.accept_keywords to a directory
*
* If you file a bug, please attach the following logfiles:
* /var/log/portage/cross-avr-info.log
|
at me. If I do that, it asks to convert .mask and others as well which I don't want to do...
https://termbin.com/bhma
---
same happened after creating local overlay as per wiki. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23082
|
Posted: Sat Apr 04, 2020 4:14 pm Post subject: |
|
|
If you convert the directories requested, does it work?
crossdev is just a wrapper. If you don't want to meet its requirements, you could do the equivalent work by hand. I think accepting its quirks is less work than reinventing it, though. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54815 Location: 56N 3W
|
Posted: Sat Apr 04, 2020 4:34 pm Post subject: |
|
|
etnull,
Cheat. Make the directory to keep crossdev happy.
Move the existing file inside the directory, so its still one file to you.
crossdev is being user friendly. Its going to create some files for itself inside these directories. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
389292 Guru
Joined: 26 Mar 2019 Posts: 504
|
Posted: Sat Apr 04, 2020 5:32 pm Post subject: |
|
|
Code: | * error: avr-libc failed :(
*
* If you file a bug, please attach the following logfiles:
* /var/log/portage/cross-avr-info.log
* /var/log/portage/cross-avr-avr-libc.log.xz
* /var/tmp/portage/cross-avr/avr-libc*/temp/avr-libc-config.logs.tar.xz |
Code: | >>> Emerging (1 of 1) cross-avr/avr-libc-2.0.0::crossdev
* avr-libc-2.0.0.tar.bz2 BLAKE2B SHA512 size ;-) ... [ ok ]
* avr-libc-manpages-2.0.0.tar.bz2 BLAKE2B SHA512 size ;-) ... [ ok ]
* Checking for avr-gcc ...
[ ok ]
>>> Unpacking source...
>>> Unpacking avr-libc-2.0.0.tar.bz2 to /var/tmp/portage/cross-avr/avr-libc-2.0.0/work
>>> Unpacking avr-libc-manpages-2.0.0.tar.bz2 to /var/tmp/portage/cross-avr/avr-libc-2.0.0/work
>>> Source unpacked in /var/tmp/portage/cross-avr/avr-libc-2.0.0/work
>>> Preparing source in /var/tmp/portage/cross-avr/avr-libc-2.0.0/work/avr-libc-2.0.0 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/cross-avr/avr-libc-2.0.0/work/avr-libc-2.0.0 ...
* econf: updating avr-libc-2.0.0/config.sub with /usr/share/gnuconfig/config.sub
* econf: updating avr-libc-2.0.0/config.guess with /usr/share/gnuconfig/config.guess
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=avr --target=avr --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --libdir=/usr/lib
configure: loading site script /usr/share/config.site
checking build system type... x86_64-pc-linux-gnu
checking host system type... avr-unknown-none
checking if configuring for cross compile... yes
checking if target host is avr... yes
checking for a BSD-compatible install... /usr/lib/portage/python3.6/ebuild-helpers/xattr/install -c
checking whether build environment is sane... yes
checking for avr-strip... avr-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for avr-gcc... avr-gcc
checking whether we are cross compiling... yes
checking for suffix of object files... configure: error: in `/var/tmp/portage/cross-avr/avr-libc-2.0.0/work/avr-libc-2.0.0':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/cross-avr/avr-libc-2.0.0/work/avr-libc-2.0.0/config.log
* ERROR: cross-avr/avr-libc-2.0.0::crossdev failed (configure phase):
* econf failed
*
* Call stack:
* ebuild.sh, line 125: Called src_configure
* environment, line 2198: Called default
* phase-functions.sh, line 855: Called default_src_configure
* phase-functions.sh, line 890: Called __eapi2_src_configure
* phase-helpers.sh, line 798: Called econf
* phase-helpers.sh, line 681: Called __helpers_die 'econf failed'
* isolated-functions.sh, line 112: Called die
* The specific snippet of code:
* die "$@"
*
* If you need support, post the output of `emerge --info '=cross-avr/avr-libc-2.0.0::crossdev'`,
* the complete build log and the output of `emerge -pqv '=cross-avr/avr-libc-2.0.0::crossdev'`.
* The complete build log is located at '/var/tmp/portage/cross-avr/avr-libc-2.0.0/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/cross-avr/avr-libc-2.0.0/temp/environment'.
* Working directory: '/var/tmp/portage/cross-avr/avr-libc-2.0.0/work/avr-libc-2.0.0'
* S: '/var/tmp/portage/cross-avr/avr-libc-2.0.0/work/avr-libc-2.0.0'
>>> Failed to emerge cross-avr/avr-libc-2.0.0, Log file:
>>> '/var/tmp/portage/cross-avr/avr-libc-2.0.0/temp/build.log'
* Messages for package cross-avr/avr-libc-2.0.0:
* ERROR: cross-avr/avr-libc-2.0.0::crossdev failed (configure phase):
* econf failed
*
* Call stack:
* ebuild.sh, line 125: Called src_configure
* environment, line 2198: Called default
* phase-functions.sh, line 855: Called default_src_configure
* phase-functions.sh, line 890: Called __eapi2_src_configure
* phase-helpers.sh, line 798: Called econf
* phase-helpers.sh, line 681: Called __helpers_die 'econf failed'
* isolated-functions.sh, line 112: Called die
* The specific snippet of code:
* die "$@"
*
* If you need support, post the output of `emerge --info '=cross-avr/avr-libc-2.0.0::crossdev'`,
* the complete build log and the output of `emerge -pqv '=cross-avr/avr-libc-2.0.0::crossdev'`.
* The complete build log is located at '/var/tmp/portage/cross-avr/avr-libc-2.0.0/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/cross-avr/avr-libc-2.0.0/temp/environment'.
* Working directory: '/var/tmp/portage/cross-avr/avr-libc-2.0.0/work/avr-libc-2.0.0'
* S: '/var/tmp/portage/cross-avr/avr-libc-2.0.0/work/avr-libc-2.0.0' |
https://termbin.com/6jhc |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23082
|
Posted: Sat Apr 04, 2020 6:21 pm Post subject: |
|
|
Code: | avr-gcc: error: unrecognized command line option '-march=westmere' | Westmere is an x86 family. You cannot use it with AVR. |
|
Back to top |
|
|
389292 Guru
Joined: 26 Mar 2019 Posts: 504
|
Posted: Sat Apr 04, 2020 6:34 pm Post subject: |
|
|
Well my host is x86-64, I want to compile a firmware for atmel based keyboard on that host, what should I do? Previously I was using avr-gcc-atmel, avr-libc-atmel and teensy-loader-cli to flash it (on Arch). There are no such things in Gentoo. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54815 Location: 56N 3W
|
Posted: Sat Apr 04, 2020 7:19 pm Post subject: |
|
|
etnull,
What command did you give crossdev ?
The error we need to see is in
Code: | configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details | Please put the config.log onto a pastebin.
Its at /var/tmp/portage/cross-avr/avr-libc-2.0.0/work/avr-libc-2.0.0/config.log
I have Code: | [10] avr-8.3.0
[11] avr-9.2.0
[12] avr-9.3.0 * | so it did work. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
389292 Guru
Joined: 26 Mar 2019 Posts: 504
|
|
Back to top |
|
|
389292 Guru
Joined: 26 Mar 2019 Posts: 504
|
Posted: Wed May 20, 2020 2:46 pm Post subject: |
|
|
Hu wrote: | Code: | avr-gcc: error: unrecognized command line option '-march=westmere' | Westmere is an x86 family. You cannot use it with AVR. |
I found why was the error, I have CPPFLAGS="${COMMON_FLAGS}" in my make.conf (which expands to "-march=westmere -O2 -pipe"), other virables CFLAGS, FFLAGS, FCFLAGS, CXXFLAGS are masked during build proccess, but CPPFLAGS are not. Now it compiles after I comment out CPPFLAGS in make.conf
---
the firmware compiles succesfully, but now I can't flash it with dfu-programmer
Code: | sudo dfu-programmer atmega32u4 flash --suppress-bootloader-mem handwired_myownnew_default.hex
dfu-programmer: no device present. |
Code: | lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 276d:1160 YSTEK G Mouse
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 04a9:190f Canon, Inc. CanoScan LiDE 220
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 018: ID bb80:050d Hexwire Ortho 5x13
Bus 005 Device 004: ID 1bcf:0005 Sunplus Innovation Technology Inc. Optical Mouse
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 010 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
|
tried to put the keyboard in a flash mode by pressing the button, the device becomes this
Code: | Bus 005 Device 023: ID 16c0:0478 Van Ooijen Technische Informatica Teensy Halfkay Bootloader |
but dfu-programmer still can't see it. |
|
Back to top |
|
|
|