Recent Posts

Pages: 1 2 3 [4] 5 6 7 8 9 10
31
Help / Re: Compiler Optimizations
« Last post by mikejp56 on April 19, 2024, 08:27:22 pm »
Hi Miguel,
Here is the text of the build log. From what I have read it appears to have something to do with compiler optimizations.
Thanks for your time.

-------------- Build: Debug in Binary_Clock_Mods (compiler: GNU GCC Compiler for AVR)---------------

avr-gcc -Wall -mmcu=atmega328p -DF_CPU=16000000UL -g  -c main.c -o obj/Debug/main.o
avr-gcc  -o bin/Debug/Binary_Clock_Mods.elf obj/Debug/fuse.o obj/Debug/main.o  -mmcu=atmega328p -Wl,-Map=bin/Debug/Binary_Clock_Mods.map,--cref 
In file included from main.c:18:0:
/usr/lib/avr/include/util/delay.h:112:3: warning: #warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed" [-Wcpp]
 # warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed"
   ^
Output file is bin/Debug/Binary_Clock_Mods.elf with size 31.85 KB
Running project post-build steps
avr-objdump -h -S bin/Debug/Binary_Clock_Mods.elf > bin/Debug/Binary_Clock_Mods.lss
avr-objcopy -R .eeprom -R .fuse -R .lock -R .signature -O ihex bin/Debug/Binary_Clock_Mods.elf bin/Debug/Binary_Clock_Mods.hex
avr-objcopy --no-change-warnings -j .eeprom --change-section-lma .eeprom=0 -O ihex bin/Debug/Binary_Clock_Mods.elf bin/Debug/Binary_Clock_Mods.eep
avr-objcopy --no-change-warnings -j .lock --change-section-lma .lock=0 -O ihex bin/Debug/Binary_Clock_Mods.elf bin/Debug/Binary_Clock_Mods.lock
avr-objcopy --no-change-warnings -j .signature --change-section-lma .signature=0 -O ihex bin/Debug/Binary_Clock_Mods.elf bin/Debug/Binary_Clock_Mods.sig
avr-objcopy --no-change-warnings -j .fuse --change-section-lma .fuse=0 -O ihex bin/Debug/Binary_Clock_Mods.elf bin/Debug/Binary_Clock_Mods.fuse
srec_cat bin/Debug/Binary_Clock_Mods.fuse -Intel -crop 0x00 0x01 -offset  0x00 -O bin/Debug/Binary_Clock_Mods.lfs -Intel
srec_cat bin/Debug/Binary_Clock_Mods.fuse -Intel -crop 0x01 0x02 -offset -0x01 -O bin/Debug/Binary_Clock_Mods.hfs -Intel
/bin/sh: 1: srec_cat: not found
Process terminated with status 127 (0 minute(s), 0 second(s))
0 error(s), 1 warning(s) (0 minute(s), 0 second(s))
 

-------------- Build file: Debug in Binary_Clock_Mods (compiler: GNU GCC Compiler for AVR)---------------

Nothing to be done (all items are up-to-date).
32
Help / Re: Compiler Optimizations
« Last post by Miguel Gimenez on April 19, 2024, 07:45:58 pm »
33
Help / Compiler Optimizations
« Last post by mikejp56 on April 19, 2024, 06:34:52 pm »
Hi All,
I am using CB with Linux Mint 20. I get the following warning "/usr/lib/avr/include/util/delay.h:112:3: warning: #warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed" [-Wcpp]
 # warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed"
I have set the compiler optimizations for 1, 2, and 3, but I still get the same warning.
I am pretty new to CodeBlocks and AVR programming.
Please point me in the correct direction.
Thanks for reading.
Regards,
mikejp56
34
Using Code::Blocks / Re: gdb of better compiler not working
« Last post by Miguel Gimenez on April 19, 2024, 01:55:30 pm »
GNU has changed the output of the "info breakpoints" command in GDB 13. From Sourceware change log:
Quote
* "info breakpoints" now displays enabled breakpoint locations of
  disabled breakpoints as in the "y-" state.  For example:

   (gdb) info breakpoints
   Num     Type           Disp Enb Address            What
   1       breakpoint     keep n   <MULTIPLE>
   1.1                         y-  0x00000000000011b6 in ...
   1.2                         y-  0x00000000000011c2 in ...
   1.3                         n   0x00000000000011ce in ...

The Enb column previously showed 'y' or 'n', now it shows 'y-' or 'n'. This may be fooling the debugger plugin.
35
Using Code::Blocks / Re: gdb of better compiler not working
« Last post by Grit Clef on April 19, 2024, 12:51:43 pm »
Then maybe Xaviou's build can be suitable?
36
Plugins development / Re: Code completion using LSP and clangd
« Last post by MaxGaspa on April 19, 2024, 11:24:34 am »
I see that you're not clicking either inside a class or a function.
Do this, after the clicked file has parsed, click inside a function, not at the top of an editor file.

Yes, clicking inside a function or class works. Thanks
37
Using Code::Blocks / Re: gdb of better compiler not working
« Last post by nenin on April 19, 2024, 07:43:50 am »
Never mind I ve figured it out turns out these nightly versions do not support 13.2 yet. So I have switched to 13.1 and now it works.
I have nighties (including last one) running with 13.2 gcc (nixman) without such problems. 
38
Using Code::Blocks / Re: gdb of better compiler not working
« Last post by nenin on April 19, 2024, 07:41:48 am »
Recent GDB introduced some changes in the output so parsing failed. This was fixed in r13162 a year ago, try the last nightly.
Here is potential other issue: The 01 April 2024 build (13496) is actually built with gcc 13.2, all its dlls- with gcc 13.1. At my experience  mixing of the c++ libraries is a lottery.
39
Using Code::Blocks / Re: gdb of better compiler not working
« Last post by mckl on April 19, 2024, 07:16:26 am »
Never mind I ve figured it out turns out these nightly versions do not support 13.2 yet. So I have switched to 13.1 and now it works.
40
Using Code::Blocks / Re: gdb of better compiler not working
« Last post by mckl on April 19, 2024, 02:08:51 am »
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Users\mstar\Desktop\CPP_AIO4\BookIV\Chapter02\BuggyProgram\
Adding source dir: C:\Users\mstar\Desktop\CPP_AIO4\BookIV\Chapter02\BuggyProgram\
Adding file: C:\Users\mstar\Desktop\CPP_AIO4\BookIV\Chapter02\BuggyProgram\bin\Debug\BuggyProgram.exe
Changing directory to: C:/Users/mstar/Desktop/CPP_AIO4/BookIV/Chapter02/BuggyProgram/.
Set variable: PATH=.;C:\mingw64\bin;C:\mingw64;C:\Program Files (x86)\Common Files\Oracle\Java\java8path;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\Git\cmd;C:\Program Files\dotnet;C:\Users\mstar\AppData\Local\Programs\Python\Python38\Scripts;C:\Users\mstar\AppData\Local\Programs\Python\Python38;C:\Users\mstar\AppData\Local\Microsoft\WindowsApps;\;C:\Program Files\JetBrains\PyCharm Community Edition 2020.3\bin

[debug]Command-line: C:\mingw64\bin\gdb.exe -nx -fullname -quiet  -args C:/Users/mstar/Desktop/CPP_AIO4/BookIV/Chapter02/BuggyProgram/bin/Debug/BuggyProgram.exe
[debug]Working dir : C:\Users\mstar\Desktop\CPP_AIO4\BookIV\Chapter02\BuggyProgram

Starting debugger: C:\mingw64\bin\gdb.exe -nx -fullname -quiet  -args C:/Users/mstar/Desktop/CPP_AIO4/BookIV/Chapter02/BuggyProgram/bin/Debug/BuggyProgram.exe
done

[debug]terminate called after throwing an instance of 'std::system_error'
[debug]terminate called recursively
[debug]  what():  Invalid argument
[debug]> set prompt >>>>>>cb_gdb:

Setting breakpoints
Debugger finished with status 1
Pages: 1 2 3 [4] 5 6 7 8 9 10