problem with esp-idf 4.0 and assembler

wevets
Posts: 112
Joined: Sat Mar 09, 2019 2:56 am

problem with esp-idf 4.0 and assembler

Postby wevets » Fri Apr 17, 2020 1:53 am

I am in the process of converting a program to esp-idf 4.0. I have installed 4.0 according to the vanilla instructions.
While assembling a .S file with the following lines:
  1. 54     // Data segment
  2. 55  .bss
  3. 56  .global     LastReadHi      // Last reported read hi word
In which I declare a pile of assembler variables,
And then the first few lines of the .text segment
  1. 110     // Code segment
  2. 111   .text
  3. 112   .global entry
  4. 113 entry:
immediately followed, with an intervening comment, by
  1. 124 // First count and report the number of times ULP has cycled
  2. 125    move r3, ULPcycles
  3. 126    ld       r0, r3, 0
  4. 127    add  r0, r0, 1
  5. 128    st       r0, r3, 0
I get the following errors out of the assembler as invoked with a simple “idf.py build” command:
  1. P.S.obj.d -o esp-idf/ulp/CMakeFiles/__idf_ulp.dir/PartBinULP.S.obj -c ../components/ulp/PartBinULP.S
  2. ../components/ulp/PartBinULP.S: Assembler messages:
  3. ../components/ulp/PartBinULP.S:55: Error: unknown pseudo-op: `.bss'
  4. ../components/ulp/PartBinULP.S:125: Error: unknown opcode or format name 'move'
  5. ../components/ulp/PartBinULP.S:126: Error: unknown opcode or format name 'ld'
  6. ../components/ulp/PartBinULP.S:127: Error: bad register name: r0
  7. ../components/ulp/PartBinULP.S:127: Error: junk at end of line, first unrecognized character is `r'
  8. ../components/ulp/PartBinULP.S:127: Internal error in ignore_rest_of_line at /builds/idf/crosstool-NG/.build/HOST-i686-w64-mingw32/xtensa-esp32-elf/src/binutils/gas/read.c:3762.
  9. Please report this bug.
It looks to me like the assembler is barfing over perfectly normal directives and mnemonics, which used to work with esp-idf 3.3 without error.

I’m seeing other problems as well as I migrate to 4.0, but I’d first like to resolve this.
Thanks.

Who is online

Users browsing this forum: Bing [Bot] and 282 guests