E-switch UI Development / FSM

1034 posts / 0 new
Last post
Lexel
Lexel's picture
Offline
Last seen: 1 year 3 weeks ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

seems save file as in the firmware trunk with right click does add HTML Java code
id the download button pressed only the Atmel code downloaded

SammysHP
SammysHP's picture
Offline
Last seen: 35 min 31 sec ago
Joined: 06/25/2019 - 14:35
Posts: 1035
Location: Germany

Lexel, I don’t see any Java in your screenshot. Just HTML because you’ve saved the page instead of the file. Also please note that Anduril is not a single source file. It consists of multiple files in several directories. Use bazaar to clone the code and you won’t have such issues.

Lexel
Lexel's picture
Offline
Last seen: 1 year 3 weeks ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

Now the firmware seems to blink out 28.9°C as 2 8 9 I don’t like, the MCU is very imprecise even when the room temp is set
it’s a wast of time to try to blink out another digit

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 6 hours 9 min ago
Joined: 01/12/2013 - 14:40
Posts: 10804
Location: (469219) 2016 HO3

Lexel wrote:
I have now tried to get a new version of Anduril built

Problem No. 1 is that all the code is totally exploded with Java

Its so bad even Atmel Studio crashes, not even to think to get that anyhow converted to be compatible

It looks like you saved a web page as a .c file and then tried to compile it. Please use bzr instead, if at all possible. You’ve had quite a few issues due to downloading source files individually instead of using the revision control tools it’s meant to be used with, and using the right tools would avoid a lot of headaches.

Lexel wrote:
Now the firmware seems to blink out 28.9°C as 2 8 9 I don’t like, the MCU is very imprecise even when the room temp is set

It doesn’t try to track or display fractional temperatures. The function which blinks out numbers has an 8-bit unsigned integer for its parameter, so the highest value it can display is 255. If you saw 289 I suspect the problem is user error of some sort.

Lexel
Lexel's picture
Offline
Last seen: 1 year 3 weeks ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

ToyKeeper][quote=Lexel wrote:
Lexel wrote:
Now the firmware seems to blink out 28.9°C as 2 8 9 I don’t like, the MCU is very imprecise even when the room temp is set

It doesn’t try to track or display fractional temperatures. The function which blinks out numbers has an 8-bit unsigned integer for its parameter, so the highest value it can display is 255. If you saw 289 I suspect the problem is user error of some sort.

Its blinking out 3 numbers now instead of 2 with latest build I downloaded
I have even seen at first numbers of >400

Temp blinks 23.8 and 24°C of Anduril the latest build

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 6 hours 9 min ago
Joined: 01/12/2013 - 14:40
Posts: 10804
Location: (469219) 2016 HO3

Lexel wrote:
Its blinking out 3 numbers now instead of 2 with latest build I downloaded
I have even seen at first numbers of >400

Temp blinks 23.8 and 24°C of Anduril the latest build

Again, it’s not doing a decimal point. It’s an 8-bit unsigned integer. The values go from 0 to 255.

The temperature itself is a 16-bit signed integer, which can go from -32768 to +32767, but the display function can only do 0 to 255. That means only the lowest 8 bits are displayed. If it says 238, either it thinks it is running at 238 C, or more likely, -18 C. Or some other number between -32768 and +32767 which happens to have the same bottom 8 bits.

Or it could be a mismatched version of the code again, including some of the recent changes but not others, which could easily lead to all sorts of strange behavior.

Cereal_killer
Cereal_killer's picture
Offline
Last seen: 1 year 11 months ago
Joined: 07/22/2013 - 13:10
Posts: 4005
Location: Ohio

Does anyone have a ready to roll atmel studio project using the newest code they’d be willing to share as a .zip?

I’ve just been downloading precompiled hexes recently but now I need to make some code changes so I took a look and there’s TONS of changes everywhere from the older early summer version my atmel studio project was last based off of.

 RIP  SPC Joey Riley, KIA 11/24/14. Now I am become death, the destroyer of worlds.

Lexel
Lexel's picture
Offline
Last seen: 1 year 3 weeks ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

still got that strange temp readout even after adding all newer file revisions to the project after flashing
after setting the value it seems to work

Only D4v2 is not building it gives me a bunch of errors, likely because of new MCU

Quote:

Severity Code Description Project File Line

Message in expansion of macro ‘SWITCH_PORT’ D4SAnduril219 fsm-pcint.c 33

Error ‘ACSRA’ undeclared (first use in this function) D4SAnduril219 \fsm-adc.c 78

Message in expansion of macro ‘SWITCH_PIN’ D4SAnduril219 \fsm-pcint.c 33

Message in expansion of macro ‘SWITCH_PCIE’ D4SAnduril219 \fsm-pcint.c 57

Message in expansion of macro ‘SWITCH_PCIE’ D4SAnduril219 \fsm-pcint.c 70

Error ‘WDTCSR’ undeclared (first use in this function) D4SAnduril219 \fsm-wdt.c 37

Error ‘CCP’ undeclared (first use in this function) D4SAnduril219 \fsm-wdt.c 75

Error ‘WDTCSR’ undeclared (first use in this function) D4SAnduril219 \fsm-wdt.c 76

Error ‘PA2’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 38

Error ‘PA2’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 38

Error ‘PCIE0’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 40

Error ‘PCIE0’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 40

Error ‘PCMSK0’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 41

Error ‘PINA’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 42

Error ‘PA6’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 47
Error’ PA5’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 61

Error’ PA4’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 62

Error’ PA3’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 63

Error’ DDRA’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 75

Message each undeclared identifier is reported only once for each function it appears in D4SAnduril219 \hwdef-Emisar_D4v2.h 75

Message in expansion of macro ‘PWM2_PIN’ D4SAnduril219 \hwdef-Emisar_D4v2.h 75

Message in expansion of macro ‘AUXLED_R_PIN’ D4SAnduril219 \hwdef-Emisar_D4v2.h 76

Message in expansion of macro ‘AUXLED_G_PIN’ D4SAnduril219 \hwdef-Emisar_D4v2.h 77

Message in expansion of macro ‘AUXLED_B_PIN’ D4SAnduril219 \hwdef-Emisar_D4v2.h 78

Error ‘TCCR1A’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 84

Error ‘WGM11’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 84

Error ‘WGM10’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 84

Error ‘TCCR1B’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 88

Error ‘WGM13’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 89

Error ‘WGM12’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 89
Error ‘PUEA’ undeclared (first use in this function) D4SAnduril219 \hwdef-Emisar_D4v2.h 94

Message in expansion of macro ‘SWITCH_PIN’ D4SAnduril219 \hwdef-Emisar_D4v2.h 94

Message in expansion of macro ‘SWITCH_PCMSK’ D4SAnduril219 \hwdef-Emisar_D4v2.h 95

Error recipe for target ‘main.o’ failed D4SAnduril219 \Release\Makefile 76

Error ‘CCP’ undeclared (first use in this function) D4SAnduril219 \tk-attiny.h 176

Message previous definition of ‘clock_div_1’ was here D4SAnduril219 \tk-attiny.h 179

Message previous definition of ‘clock_div_2’ was here D4SAnduril219 \tk-attiny.h 180

Message previous definition of ‘clock_div_4’ was here D4SAnduril219 \tk-attiny.h 181

Message previous definition of ‘clock_div_8’ was here D4SAnduril219 \tk-attiny.h 182

Message previous definition of ‘clock_div_16’ was here D4SAnduril219 \tk-attiny.h 183

Message previous definition of ‘clock_div_32’ was here D4SAnduril219 \tk-attiny.h 184

Message previous definition of ‘clock_div_64’ was here D4SAnduril219 \tk-attiny.h 185

Message previous definition of ‘clock_div_128’ was here D4SAnduril219 \tk-attiny.h 186

Message previous definition of ‘clock_div_256’ was here D4SAnduril219 \Anduril 02.09.2019\tk-attiny.h 187

Message previous declaration of ‘clock_div_t’ was here D4SAnduril219 \tk-attiny.h 188

Error redeclaration of enumerator ‘clock_div_1’ D4SAnduril219 c:\program files (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\power.h 1747

Error redeclaration of enumerator ‘clock_div_2’ D4SAnduril219 c:\program files (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\power.h 1748

Error redeclaration of enumerator ‘clock_div_4’ D4SAnduril219 c:\program files (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\power.h 1749

Error redeclaration of enumerator ‘clock_div_8’ D4SAnduril219 c:\program files (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\power.h 1750

Error redeclaration of enumerator ‘clock_div_16’ D4SAnduril219 c:\program files (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\power.h 1751
Error redeclaration of enumerator ‘clock_div_32’ D4SAnduril219 c:\program files (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\power.h 1752

Error redeclaration of enumerator ‘clock_div_64’ D4SAnduril219 c:\program files (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\power.h 1753

Error redeclaration of enumerator ‘clock_div_128’ D4SAnduril219 c:\program files (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\power.h 1754

Error redeclaration of enumerator ‘clock_div_256’ D4SAnduril219 c:\program files (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\power.h 1755

Error conflicting types for ‘clock_div_t’ D4SAnduril219 c:\program files (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\power.h 1756

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 6 hours 9 min ago
Joined: 01/12/2013 - 14:40
Posts: 10804
Location: (469219) 2016 HO3

Cereal_killer wrote:
Does anyone have a ready to roll atmel studio project using the newest code they’d be willing to share as a .zip?

I’ve just been downloading precompiled hexes recently but now I need to make some code changes so I took a look and there’s TONS of changes everywhere from the older early summer version my atmel studio project was last based off of.

The build has been getting more complicated over time, harder to make it work inside Atmel Studio. It simply isn’t designed for the sort of things being done in this code, like having a bunch of build targets which are detected at compile time by the file names.

Depending on your setup, it might be easier to use WSL (Windows Subsystem for Linux) instead of Atmel Studio, so you can use the same development tools it was made with. It basically makes a virtual container running a Linux distro. Either the Ubuntu or Debian flavors should work. From there, the instructions in the README file should be useful.

Lexel
Lexel's picture
Offline
Last seen: 1 year 3 weeks ago
Joined: 11/01/2016 - 08:00
Posts: 5895
Location: Germany

ToyKeeper wrote:
Cereal_killer wrote:
Does anyone have a ready to roll atmel studio project using the newest code they’d be willing to share as a .zip?

I’ve just been downloading precompiled hexes recently but now I need to make some code changes so I took a look and there’s TONS of changes everywhere from the older early summer version my atmel studio project was last based off of.

The build has been getting more complicated over time, harder to make it work inside Atmel Studio. It simply isn’t designed for the sort of things being done in this code, like having a bunch of build targets which are detected at compile time by the file names.

Depending on your setup, it might be easier to use WSL (Windows Subsystem for Linux) instead of Atmel Studio, so you can use the same development tools it was made with. It basically makes a virtual container running a Linux distro. Either the Ubuntu or Debian flavors should work. From there, the instructions in the README file should be useful.

Because most flashlight users here can’t use command line Linux stuff

My question is:
Why isn’t it possible after some major updates that you get a working AS7 project uploaded, maybe 3-4 times a year
You are familiar with all that coding, instead some members have to try it on their own to get it somehow working, often messing it totally up

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 1 day 6 hours ago
Joined: 03/24/2016 - 07:44
Posts: 9402
Location: Everything is brighter in Texas

I will say that once TK posted setup instructions for linux, I was able to get it working in a Mint virtual machine (there were like 4 or 5 command lines commands you copy / paste). Things basically just worked.

I had to lookup a few commands for BZR and some other stuff that would be nice to add to the setup guide but overall once it was all figured out, I got a copy of the repo made locally and everything compiles fine using the scripts she includes in the repo.

Now anytime I need to get a new version, I can’t really figure out how to merge, so I just delete the old repo copy and download a new one, not the correct method but it works. Just kinda sucks to re-make any changes I have made.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 6 hours 9 min ago
Joined: 01/12/2013 - 14:40
Posts: 10804
Location: (469219) 2016 HO3
Lexel wrote:
After again like 2 hours matching code from older version with code of new I got a hopefully working Anduril …

It shouldn’t take 2 hours to get the latest code. It only requires one quick command to pull updates in a local mirror of the upstream branch. Setting that up the first time is pretty quick:

cd src/flashlight-firmware
bzr branch lp:~toykeeper/flashlight-firmware/fsm
cd fsm

Then whenever you want to grab the latest updates, go to that directory and run “bzr pull”.

To do actual development, it should be in a different branch. For that, try something like “bzr branch fsm myproject” and then work inside the “myproject” directory. And if you want to merge changes from upstream, do something like “cd myproject ; bzr merge ../fsm ; bzr commit”.

Lexel wrote:
… this part is new …

Quote:

#ifndef LAYOUT_DEFINED
#error Hey, you need to define an I/O pin layout.

That was changed last year.

So if I understand correctly, you’ve been using code from 2018 this whole time, mixed with some code from 2019? No wonder it’s not working.

Edit: If it helps put things in more familiar terms, the LT1 lantern driver is up to version 5.1 now. But imagine if I built a circuit using the solder mask from v2.0, the drill holes from v3.0, the ink markings from v4.3, and the copper pours from v5.1. Even if the factory was able to print it, I would end up with a PCB which doesn’t work.

SammysHP
SammysHP's picture
Offline
Last seen: 35 min 31 sec ago
Joined: 06/25/2019 - 14:35
Posts: 1035
Location: Germany

Someone who is able to design a PCB should also be able to type a few commands in a terminal. It’s really not that hard. A Linux OS makes it easier, of course. And modern Linux systems are easy to install and use. Just try to install an Ubuntu in a virtual machine, forward the programmer USB device and follow the official instructions.

Cereal_killer
Cereal_killer's picture
Offline
Last seen: 1 year 11 months ago
Joined: 07/22/2013 - 13:10
Posts: 4005
Location: Ohio

@SammysHP I can design and hand populate pcb’s and I can’t do it.
Just sayin. I even have a Linux machine and STILL can’t use bzr / all that crazy stuff that I just can’t mentally follow, all these command lines look like jibberish to me. I don’t even know where the terminal is! So now without AS7 on my windows machine working apparently I can no longer build FW at all (and am thus limited to precompiled hexes, bummer).

There are HW guys and there are SW guys and some people just can’t learn…

Still working on getting AS7 working with modern FSM, down to 11 errors, 5 warnings and a message!

Remember when Mattaus taught us all how to use eagle? Anyone wanna do that for a Linux based build environment on windows? I mean complete start to finish, no NOTHING to being able to do it…

 RIP  SPC Joey Riley, KIA 11/24/14. Now I am become death, the destroyer of worlds.

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 1 day 6 hours ago
Joined: 03/24/2016 - 07:44
Posts: 9402
Location: Everything is brighter in Texas

Cereal_killer wrote:
@SammysHP I can design and hand populate pcb’s and I can’t do it.
Just sayin. I even have a Linux machine and STILL can’t use bzr / all that crazy stuff that I just can’t mentally follow, all these command lines look like jibberish to me. I don’t even know where the terminal is! So now without AS7 on my windows machine working apparently I can no longer build FW at all (and am thus limited to precompiled hexes, bummer).

There are HW guys and there are SW guys and some people just can’t learn…

Still working on getting AS7 working with modern FSM, down to 11 errors, 5 warnings and a message!

Remember when Mattaus taught us all how to use eagle? Anyone wanna do that for a Linux based build environment on windows? I mean complete start to finish, no NOTHING to being able to do it…

The terminal commands are really pretty simple if you just accept that you don’t care what they mean and simply copy/paste the ones TK says. I started using computers back in the DOS days so I have a pretty good handle on how a command line works, just not the exact commands for linux.

It would be cool if TK included that linux setup guide in the OP (make is easier for me to find if I needed it again). Basically all the commands to go from a fresh linux install to compiling the firmware. She already had most of the commands in the post I used, just some bzr commands that I had to look up myself IIRC.

Once all of those commands are run, then it is simply a matter of using a text editor you like (I use Atom personally) and editing the firmware like normal.

Then you simply run the compile scripts that TK includes and things just seem to work.

I am also more comfortable using windows but I have had much less issues compiling on linux. Once those commands that you can copy/paste are out of the way, it is really not that different then using windows since atom has a full GUI (I use Atom on windows as well).

Another advantage of using a virtual machine for compiling is that I can save the state with all the firmware windows I want open and ready for editing. Makes it easier to jump in and out of edits over time.

Agro
Agro's picture
Offline
Last seen: 10 hours 14 min ago
Joined: 05/14/2017 - 11:16
Posts: 6868
Location: Ślōnsk

TK, from the 3 changes that I proposed for merge you took only 1. That’s OK but I’d like to know whether to bother you with similar changes (ones that don’t affect any default config) in the future.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 6 hours 9 min ago
Joined: 01/12/2013 - 14:40
Posts: 10804
Location: (469219) 2016 HO3
Agro wrote:
TK, from the 3 changes that I proposed for merge you took only 1. That’s OK but I’d like to know whether to bother you with similar changes (ones that don’t affect any default config) in the future.

Sorry, I still had the tab open, but I hadn’t gotten to it yet. The other two changes both needed fixes before they could be added, so I put it off until later. It’s unfortunately easy to let “later” be a long time though, when one has hundreds of windows and tabs open, all waiting for attention.

Anyway, I applied the necessary fixes and added the changes for making beacon mode and momentary mode optional.

Agro
Agro's picture
Offline
Last seen: 10 hours 14 min ago
Joined: 05/14/2017 - 11:16
Posts: 6868
Location: Ślōnsk

I see. There’s no need to rush such changes, I just wanted to know where I stood.
I have a couple of similar changes:
https://code.launchpad.net/~nisjuk/flashlight-firmware/nisjuk2
(note: it’s a different branch) revisions 463, 464

Agro
Agro's picture
Offline
Last seen: 10 hours 14 min ago
Joined: 05/14/2017 - 11:16
Posts: 6868
Location: Ślōnsk

SammysHP wrote:
You can set the EESAVE fuse so that the EEPROM is not erased during flashing. But then you have to make sure that the addresses of the variables stay the same.

Am I doing it right? I’d like to validate before I fire the command…

First I read the fuse values:
avrdude -c usbasp -p t1634 -P COM3 -b 19200 -v
(…)
Fuses OK (E:FF, H:DE, L:E2)

In the datasheet I see that EESAVE is bit 3 of high fuse.
Decoding the fuse (just to check if I understand things right) I get:

  • Bit 0 (BODLEVEL0)
  • Bit 5 (SPIEN)

So to set the bit 3 I should provide avrdude with the following argument:
-U hfuse:w:0xd6:m

Right?

SammysHP
SammysHP's picture
Offline
Last seen: 35 min 31 sec ago
Joined: 06/25/2019 - 14:35
Posts: 1035
Location: Germany

Yes, your command should be correct.

Btw: This fuse calculator is a big help, but always verify with the datasheet. http://www.engbedded.com/fusecalc/

Agro
Agro's picture
Offline
Last seen: 10 hours 14 min ago
Joined: 05/14/2017 - 11:16
Posts: 6868
Location: Ślōnsk

Thanks. Actually I used it to do binary calculation but needed to consult the ds because the calculator doesn’t support 1634.

Agro
Agro's picture
Offline
Last seen: 10 hours 14 min ago
Joined: 05/14/2017 - 11:16
Posts: 6868
Location: Ślōnsk

I have one improvement idea….I’m not sure whether it can be done with software alone or whether it requires special hardware but I’m sure you TK know. Wink

The aux LEDs when running low are not very visible during the day.
At the same time they are brighter than moonlight and actually disturbingly bright during the night.

Maybe it would be possible to detect ambient lighting conditions with the main LEDs and adjust aux brightness accordingly?

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 6 hours 9 min ago
Joined: 01/12/2013 - 14:40
Posts: 10804
Location: (469219) 2016 HO3

Agro wrote:
The aux LEDs when running low are not very visible during the day.
At the same time they are brighter than moonlight and actually disturbingly bright during the night.

Maybe it would be possible to detect ambient lighting conditions with the main LEDs and adjust aux brightness accordingly?

It requires special hardware. No supported drivers have this capability. Even the FW3A’s optic nerve can’t determine ambient light levels, since its signal is highpassed to pull it down to zero.

However, one question. Did you mean to say “The aux LEDs when running high“? Because on low, they’re usually nowhere near the brightness of moon mode.

Agro
Agro's picture
Offline
Last seen: 10 hours 14 min ago
Joined: 05/14/2017 - 11:16
Posts: 6868
Location: Ślōnsk

No, I meant low. I’ll re-check that this night because maybe they were not running at the level I thought they were…

Agro
Agro's picture
Offline
Last seen: 10 hours 14 min ago
Joined: 05/14/2017 - 11:16
Posts: 6868
Location: Ślōnsk

Agro wrote:
I see. There’s no need to rush such changes, I just wanted to know where I stood.
I have a couple of similar changes:
https://code.launchpad.net/~nisjuk/flashlight-firmware/nisjuk2
(note: it’s a different branch) revisions 463, 464

Another small fix in changeset 472.
BTW, what gcc version do you use?
I use 9.2 and a few images don’t build:
Quote:
avr-gcc -DCONFIGFILE=cfg-emisar-d18.h -Wall -g -Os -mmcu=attiny85 -c -std=gnu99 -fgnu89-inline -fwhole-program -DATTINY=85 -I.. -I../.. -I../../.. -fshort-enums -o anduril.o -c anduril.c avr-gcc -Wall -g -Os -mmcu=attiny85 -fgnu89-inline -o anduril.elf anduril.o /usr/libexec/gcc/avr/ld: anduril.elf section `.text’ will not fit in region `text’ /usr/libexec/gcc/avr/ld: region `text’ overflowed by 122 bytes
Quote:
avr-gcc -DCONFIGFILE=cfg-mateminco-mf01-mini.h -Wall -g -Os -mmcu=attiny85 -c -std=gnu99 -fgnu89-inline -fwhole-program -DATTINY=85 -I.. -I../.. -I../../.. -fshort-enums -o anduril.o -c anduril.c avr-gcc -Wall -g -Os -mmcu=attiny85 -fgnu89-inline -o anduril.elf anduril.o /usr/libexec/gcc/avr/ld: anduril.elf section `.text’ will not fit in region `text’ /usr/libexec/gcc/avr/ld: region `text’ overflowed by 94 bytes
hank
hank's picture
Offline
Last seen: 1 week 8 hours ago
Joined: 09/04/2011 - 21:52
Posts: 9599
Location: Berkeley, California
Agro
Agro's picture
Offline
Last seen: 10 hours 14 min ago
Joined: 05/14/2017 - 11:16
Posts: 6868
Location: Ślōnsk

This link leads to a paywall. They want me to pay either with cash or privacy and don’t serve content unless I do.

Agro
Agro's picture
Offline
Last seen: 10 hours 14 min ago
Joined: 05/14/2017 - 11:16
Posts: 6868
Location: Ślōnsk

Agro wrote:
No, I meant low. I’ll re-check that this night because maybe they were not running at the level I thought they were…

I checked that:
It’s very likely that I actually used high.
That said, the lows could really see some improvement.
The different colours have very different brightness. Blue is less bright than moonlight but nevertheless disturbingly bright at some angles.
Green seems slightly dimmer to my eyes and red is much much dimmer. White is not white, red component is completely invisible…

I’ll try to improve this. Sounds like a good noob task. Smile

ADDED:

If I understand that correctly – this is controlled purely by hardware, not by software. Sad

Agro
Agro's picture
Offline
Last seen: 10 hours 14 min ago
Joined: 05/14/2017 - 11:16
Posts: 6868
Location: Ślōnsk

Agro wrote:
BTW, what gcc version do you use?
I use 9.2 and a few images don’t build:

Quote:
avr-gcc -DCONFIGFILE=cfg-emisar-d18.h -Wall -g -Os -mmcu=attiny85 -c -std=gnu99 -fgnu89-inline -fwhole-program -DATTINY=85 -I.. -I../.. -I../../.. -fshort-enums -o anduril.o -c anduril.c
avr-gcc -Wall -g -Os -mmcu=attiny85 -fgnu89-inline -o anduril.elf anduril.o
/usr/libexec/gcc/avr/ld: anduril.elf section `.text’ will not fit in region `text’
/usr/libexec/gcc/avr/ld: region `text’ overflowed by 122 bytes

Quote:
avr-gcc -DCONFIGFILE=cfg-mateminco-mf01-mini.h -Wall -g -Os -mmcu=attiny85 -c -std=gnu99 -fgnu89-inline -fwhole-program -DATTINY=85 -I.. -I../.. -I../../.. -fshort-enums -o anduril.o -c anduril.c
avr-gcc -Wall -g -Os -mmcu=attiny85 -fgnu89-inline -o anduril.elf anduril.o
/usr/libexec/gcc/avr/ld: anduril.elf section `.text’ will not fit in region `text’
/usr/libexec/gcc/avr/ld: region `text’ overflowed by 94 bytes

I thought that picking the best compiler version would be a possibility to save a few bytes.
So I tried gcc 6,7,8,9 to check which produces the smallest output.
gcc 8 won.
But it still can’t compile these 2 configs which makes me thing that TK may be using something even older than that…
Schoki
Schoki's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 03/27/2017 - 15:34
Posts: 223
Location: Germany

Try with gcc-avr 5.4, maybe then it works.

Pages