In my small project IRremote library was used. in this library the boardsdef.h file was amended. Timer2 was changed to Timer1 for Atmega8.
How can we use this change only for my project and leave the original as it is.
Is there a way that project files can be placed together so that the same are used by the compiler at compile time.
You can bundle the modified library with the sketch in a subfolder named src. Let's say the sketch was named "MyProject". The folder structure would look like this:
MyProject
|_ MyProject.ino
|_ all other sketch files
|_ src
|_ IRremote
|_ IRremote.h
|_ all other files of the modified IRremote library
Then in your sketch, you need to make the #include directive for the IRremote library like this:
#include "src/IRremote/IRremote.h"
Now the MyProject sketch will use the modified version of the IRremote library that is bundled with the sketch in the src folder. If you have other sketches that you want to use the unmodified IRremote library (which you have installed normally in the libraries subfolder of your sketchbook folder), you just use the normal style of #include directive:
#include <IRremote.h>
pert:
You can bundle the modified library with the sketch in a subfolder named src. Let's say the sketch was named MyProject. The folder structure would look like this:MyProject
|_MyProject.ino
|_all other sketch files
|_src
|_IRremote
|_IRremote.h
|_all other files of the modified IRremote libraryThen in your sketch, you need to make the #include directive for the IRremote library like this:
#include "src/IRremote/IRremote.h"\
Now the MyProject sketch will use the modified version of the IRremote library that is bundled with the sketch in the src folder. If you have other sketches that you want to use the unmodified IRremote library (which you have installed normally in the libraries subfolder of your sketchbook folder), you just use the normal style of #include directive:
#include <IRremote.h>
Thanks pert, I have created the directory structure as you showed.
This library was modified to be used with ATmega 8. If I write other sketches that need this library can I use
#include "MyProject/src/IRremote/IRremote.h"
?
Unfortunately, no. You can only use that library from your MyProject sketch. In order to use the same copy of the modified IRremote library, you would need to turn it into a new library. The folder structure would look something like this:
{sketchbook folder}
|_ libraries
|_ IRremote
| |_ IRremote.h
| |_ all other files of the unmodified IRremote library
|_ IRremoteModified
|_ IRremoteModified.h
|_ all other files of the modified IRremote library
IRremoteModified.h is IRremote.h renamed.
You will need to update all the #include directives in the modified IRremote library's source files to reflect the changed file name. So you would do a global search and replace of IRremote.h to IRremoteModified.h
Then in your sketch if you want to use the modified IRremote library you do this:
#include <IRremoteModified.h>
And if you want to use the unmodified library you do this:
#include <IRremote.h>
You can find the location of {sketchbook folder} in the Arduino IDE at File > Preferences > Sketchbook folder.
pert:
You can find the location of {sketchbook folder} in the Arduino IDE at File > Preferences > Sketchbook folder.
My sketchbook folder is in the portable directory.
If I understand you right I just need to make a IRremoteModified directory in the original directory.
and in this directory place only the modified files with Modified appended to their names. I Think this would be better than duplicating the whole library in the src folder.
I'm trying to wrap my head around how you could do that, and I'm just not seeing it. The question more important than "how" is "why". It's easier to duplicate the entire library than picking out the modified files (and remember you'll need to re-do this every time you update the library). The only possible benefit to not unnecessarily duplicating library files is to save space on your hard drive, but the amount of space these files take up is inconsequential.
Feel free to go ahead and try to make it work, but I think you're wasting your time. That said, is time spent learning and having fun with Arduino ever truly wasted?
pert:
I'm trying to wrap my head around how you could do that, and I'm just not seeing it. The question more important than "how" is "why". It's easier to duplicate the entire library than picking out the modified files (and remember you'll need to re-do this every time you update the library). The only possible benefit to not unnecessarily duplicating library files is to save space on your hard drive, but the amount of space these files take up is inconsequential.Feel free to go ahead and try to make it work, but I think you're wasting your time. That said, is time spent learning and having fun with Arduino ever truly wasted?
Right you are, appending every file name is an ask prone with opportunity to err. I will go by the src method.
Thanks for your time pert.
I zipped the IRremote Folder that has all the files in the src folder as a zipped folder as xxxxxx.zip
when I install this library as a zipped folder, it installs but doesnt show under the listing of contributed libraries. BTW the original library is from Github
Now comes the question why.
Where is the listing of contributed libraries? Are you talking about Library Manager (Sketch > Include Library > Manage Libraries... or Tools > Manage Libraries...)?
pert:
Where is the listing of contributed libraries? Are you talking about Library Manager ( Sketch > Include Library > Manage Libraries... or Tools > Manage Libraries...)?
Sketch > Include Library > Manage Libraries..Add Zip...
https://forum.arduino.cc/index.php?topic=356957.0
Came across this discssion on the forum
I modified the library.properties file where i changed name=IRremote to
name AtEightIRremote
Now added thtis to my libraries folder by sketch>include a library>add a zip.
Now the library is installed and is visible in the library listing.
However when this library is included in a blank sketch and compiled it throws up an error. The sketch and error are below
#include <boarddefs.h>
#include <IRremote.h>
#include <IRremoteInt.h>
#include <ir_Lego_PF_BitStreamEncoder.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Arduino: 1.8.10 (Windows 10), Board: "ATmega8, Yes (UART0), BOD 2.7V, LTO disabled, 16 MHz external"
D:\Arduino_1.8.10\arduino-1.8.10\arduino-builder -dump-prefs -logger=machine -hardware D:\Arduino_1.8.10\arduino-1.8.10\hardware -hardware D:\Arduino_1.8.10\arduino-1.8.10\portable\packages -hardware D:\Arduino_1.8.10\arduino-1.8.10\Portable\Sketchbook\hardware -tools D:\Arduino_1.8.10\arduino-1.8.10\tools-builder -tools D:\Arduino_1.8.10\arduino-1.8.10\hardware\tools\avr -tools D:\Arduino_1.8.10\arduino-1.8.10\portable\packages -built-in-libraries D:\Arduino_1.8.10\arduino-1.8.10\libraries -libraries D:\Arduino_1.8.10\arduino-1.8.10\Portable\Sketchbook\libraries -fqbn=MiniCore:avr:8:bootloader=uart0,BOD=2v7,LTO=Os,clock=16MHz_external -ide-version=10810 -build-path C:\Users\Karanbir\AppData\Local\Temp\arduino_build_57138 -warnings=none -build-cache C:\Users\Karanbir\AppData\Local\Temp\arduino_cache_179457 -prefs=build.warn_data_percentage=75 -verbose D:\Arduino_1.8.10\arduino-1.8.10\Portable\Sketchbook\tesLibrary\tesLibrary.ino
D:\Arduino_1.8.10\arduino-1.8.10\arduino-builder -compile -logger=machine -hardware D:\Arduino_1.8.10\arduino-1.8.10\hardware -hardware D:\Arduino_1.8.10\arduino-1.8.10\portable\packages -hardware D:\Arduino_1.8.10\arduino-1.8.10\Portable\Sketchbook\hardware -tools D:\Arduino_1.8.10\arduino-1.8.10\tools-builder -tools D:\Arduino_1.8.10\arduino-1.8.10\hardware\tools\avr -tools D:\Arduino_1.8.10\arduino-1.8.10\portable\packages -built-in-libraries D:\Arduino_1.8.10\arduino-1.8.10\libraries -libraries D:\Arduino_1.8.10\arduino-1.8.10\Portable\Sketchbook\libraries -fqbn=MiniCore:avr:8:bootloader=uart0,BOD=2v7,LTO=Os,clock=16MHz_external -ide-version=10810 -build-path C:\Users\Karanbir\AppData\Local\Temp\arduino_build_57138 -warnings=none -build-cache C:\Users\Karanbir\AppData\Local\Temp\arduino_cache_179457 -prefs=build.warn_data_percentage=75 -verbose D:\Arduino_1.8.10\arduino-1.8.10\Portable\Sketchbook\tesLibrary\tesLibrary.ino
Using board '8' from platform in folder: D:\Arduino_1.8.10\arduino-1.8.10\Portable\packages\MiniCore\hardware\avr\2.0.3
Using core 'MCUdude_corefiles' from platform in folder: D:\Arduino_1.8.10\arduino-1.8.10\Portable\packages\MiniCore\hardware\avr\2.0.3
Detecting libraries used...
"D:\\Arduino_1.8.10\\arduino-1.8.10\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega8 -DF_CPU=16000000L -DARDUINO=10810 -DARDUINO_AVR_ATmega8 -DARDUINO_ARCH_AVR "-ID:\\Arduino_1.8.10\\arduino-1.8.10\\Portable\\packages\\MiniCore\\hardware\\avr\\2.0.3\\cores\\MCUdude_corefiles" "-ID:\\Arduino_1.8.10\\arduino-1.8.10\\Portable\\packages\\MiniCore\\hardware\\avr\\2.0.3\\variants\\standard" "C:\\Users\\Karanbir\\AppData\\Local\\Temp\\arduino_build_57138\\sketch\\tesLibrary.ino.cpp" -o nul
Alternatives for boarddefs.h: [IRremote@2.2.3 AtEightIRremote@2.2.3]
ResolveLibrary(boarddefs.h)
-> candidates: [IRremote@2.2.3 AtEightIRremote@2.2.3]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7855fb]
goroutine 1 [running]:
github.com/arduino/arduino-cli/legacy/builder.ResolveLibrary(0x11ce25a0, 0x121ae095, 0xb, 0x121ae095)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/resolve_library.go:64 +0x14b
github.com/arduino/arduino-cli/legacy/builder.findIncludesUntilDone(0x11ce25a0, 0x121682a0, 0x88ed00, 0x11c82d20, 0x12167470, 0x11de3b00, 0x0)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/container_find_includes.go:358 +0x3b6
github.com/arduino/arduino-cli/legacy/builder.(*ContainerFindIncludes).Run(0xdebc68, 0x11ce25a0, 0xdebc68, 0x0)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/container_find_includes.go:152 +0x3e5
github.com/arduino/arduino-cli/legacy/builder.runCommands(0x11ce25a0, 0x11c33e1c, 0x20, 0x20, 0x1, 0x18effff, 0x800)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:210 +0xbd
github.com/arduino/arduino-cli/legacy/builder.(*Builder).Run(0x11c61f40, 0x11ce25a0, 0xdebbb4, 0x11c68ba8)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:117 +0xb9c
github.com/arduino/arduino-cli/legacy/builder.RunBuilder(...)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:226
main.main()
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-builder/main.go:398 +0x6d2
D:\Arduino_1.8.10\arduino-1.8.10\arduino-builder returned 2
Error compiling for board ATmega8.
The error is caused by a bug in the Arduino IDE. Arduino IDE 1.8.10 is a bit unstable due to being the first release since the switch to using the arduino-cli tool. Although it's a really wonderful advancement for Arduino, this tool is still in a beta development state and so it has some bugs. If you switch to using Arduino IDE 1.8.9 it won't occur:
I was able to reproduce the error on Arduino IDE 1.8.10, but with the beta build of the Arduino IDE it doesn't occur so I believe the bug has already been fixed and will not be a problem when the next release of the Arduino IDE comes out.
But I think you might have misunderstood my recommendation. It's fine that you changed the library's name, but you also need to change the file name of IRremote.h. The reason is that when there are two libraries installed that both have the file in your #include directive, the Arduino IDE needs to pick one of the two to use, and you don't have any control over which it will pick. If each library has a unique file name then you can control which library you are using.
Another thing is that you should not use Sketch > Include Library > {library name}. All that feature does is to add #include directives to your sketch for all the .h files in the library. But you don't want or need all the .h files. You only want IRremote.h (or whatever you have renamed that file in the modified version of the library). It is possible for the library author to specify in library.properties exactly which files #include directives should be added for, but unfortunately the IRremote library developers haven't bothered with that yet. But it's really no big deal because it's easy enough to just add the #include directive to your sketch manually. Sketch > Include Library doesn't do anything other than that.
Hi pert,
I installed the nightly build of the IDE.
I renamed the library to IR_remote
Changed the files IRremote.h,IRremoteInt.h to IR_remote.h.... In every file did a search and replace of previous names and changed them.
Now the library compiles with a empty sketch.
However it gives error with sketch that compiled using the src method of include that you suggested.
The code and error are
/*
*****************************************************************************
*** NOTE This code works as original coded from Extreme electronics ***
*** Only the IR library is changed to standard library.However in this ***
*** library Timer2 for atmega8 has been changed to Timer1 as this code ***
*** uses timer2. For Last Speed and Power state has been coded. ***
*** For this help was extended by the Arduino Forum. ***
*** In the file boardsdef.h timer2 was changed to Timer1 ***
*****************************************************************************
Hardware:
INT0 - IR Receiver
INT1 - Zero Crossing Detector.
PD5 - Triac Control.
For
ATmega8 @ 16MHz
Fuse:
HIGH=0xC9 LOW=0xFF
*/
#include <EEPROM.h>
#include <arduino.h>
#include <board_defs.h>
#include <ir_Lego_PF_BitStreamEncoder.h>
#include <IR_remote.h>
#include <IR_remoteInt.h>
#define FAN_POWER_LED_PORT PORTD
#define FAN_POWER_LED_DDR DDRD
#define FAN_POWER_LED_BIT 7
#define POWER_LED_ON() FAN_POWER_LED_PORT&=(~(1<<FAN_POWER_LED_BIT))
#define POWER_LED_OFF() FAN_POWER_LED_PORT|=(1<<FAN_POWER_LED_BIT)
uint8_t table[10] = {141, 125, 109, 94, 78, 62, 47, 31, 16, 1};
const int iRReceivePin = PD2;
IRrecv irrecv(iRReceivePin);
decode_results results;
int speed = 0;
uint8_t fan_on = 0;
void initialize()
{
irrecv.enableIRIn();
FAN_POWER_LED_DDR |= 0B10000000; //1
EEPROM.get (3, fan_on);
if (fan_on == 1)
{
POWER_LED_ON();
}
else
{
POWER_LED_OFF();
}
DDRC |= 0b00111111; //Seven segment digits a,b,c,d,e,f //2
DDRB |= 0b00000010; //Middle segment g //3
display (0);
EEPROM.get (0 , speed);
display (speed);
//void RemoteInit();
//Initialize the zero crossing detector INT(1)
MCUCR |= ((1 << ISC11) | (1 << ISC10)); //INT in Rising edge
GICR |= (1 << INT1); //Enable INT1
//Output
DDRD |= (1 << PD5);
PORTD |= (1 << PD5); //High = TRIAC Off
//Set Timer 2
TCCR2 |= (1 << WGM21); //CTC
TIMSK |= (1 << OCIE2); //Enable OCI2
sei();
}
/*
Zero Crossing Detect.
*/
ISR(INT1_vect)
{
if (!fan_on)
{
PORTD |= (1 << PD5); //High = TRIAC Off
return;
}
if (speed == 9)
{
PORTD &= (~(1 << PD5)); //low = TRIAC ON
return;
}
PORTD |= (1 << PD5); //High = TRIAC Off
OCR2 = table[speed];
TCNT2 = 0x00;
TCCR2 |= ((1 << CS22) | (1 << CS21) | (1 << CS20)); //Start Timer prescaler =1024
}
/*
Timer2 Compare ISR
*/
ISR(TIMER2_COMP_vect)
{
PORTD &= (~(1 << PD5)); //low = TRIAC ON
TCCR2 &= (~((1 << CS22) | (1 << CS21) | (1 << CS20))); //Stop Timer
}
/*
Displays a number in Seven Seg Display
*/
void display (int num)
{
if (num > 9)
return;
switch (num)
{
case 0:
PORTC = 0B00000000;
PORTB = 0B00000010;
break;
case 1:
PORTC = 0B00111001;
PORTB = 0B00000010;
break;
case 2:
PORTC = 0B00100100;
PORTB = 0B00000000;
break;
case 3:
PORTC = 0B00110000;
PORTB = 0B00000000;
break;
case 4:
PORTC = 0B00011001;
PORTB = 0B00000000;
break;
case 5:
PORTC = 0B00010010;
PORTB = 0B00000000;
break;
case 6:
PORTC = 0B00000010;
PORTB = 0B00000000;
break;
case 7:
PORTC = 0B00111000;
PORTB = 0B00000010;
break;
case 8:
PORTC = 0B00000000;
PORTB = 0B00000000;
break;
case 9:
PORTC = 0B00010000;
PORTB = 0B00000000;
break;
}
}
int main ()
{
initialize ();
while (1)
{
if (irrecv.decode(&results))
{
switch (results.value)
{
case 0xFF48B7: // NEC code for UP Key
{
if (speed < 9)
speed++;
EEPROM.put(0, speed);
}
break;
case 0XFF609F: //NEC Code for DOWN Key
{
if (speed > 0)
speed--;
EEPROM.put(0, speed);
}
break;
case 0xFFAA55: // NEC code for enter key
{
if (fan_on)
{
POWER_LED_OFF();
fan_on = 0;
EEPROM.put (3, fan_on);
}
else
{
POWER_LED_ON();
fan_on = 1;
EEPROM.put (3, fan_on);
}
}
break;
}
irrecv.resume(); // Receive the next value
}
display (speed);
}
}
Arduino: 1.8.11 Hourly Build 2019/12/09 01:33 (Windows 10), Board: "ATmega8, Yes (UART0), BOD 2.7V, LTO disabled, 16 MHz external"
Using board '8' from platform in folder: D:\Arduino_nightly\arduino-nightly\Portable\packages\MiniCore\hardware\avr\2.0.3
Using core 'MCUdude_corefiles' from platform in folder: D:\Arduino_nightly\arduino-nightly\Portable\packages\MiniCore\hardware\avr\2.0.3
Detecting libraries used...
"D:\\Arduino_nightly\\arduino-nightly\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega8 -DF_CPU=16000000L -DARDUINO=10811 -DARDUINO_AVR_ATmega8 -DARDUINO_ARCH_AVR "-ID:\\Arduino_nightly\\arduino-nightly\\Portable\\packages\\MiniCore\\hardware\\avr\\2.0.3\\cores\\MCUdude_corefiles" "-ID:\\Arduino_nightly\\arduino-nightly\\Portable\\packages\\MiniCore\\hardware\\avr\\2.0.3\\variants\\standard" "C:\\Users\\Karanbir\\AppData\\Local\\Temp\\arduino_build_462816\\sketch\\Triac_Control_With_Last_State_Saved1.ino.cpp" -o nul
Alternatives for EEPROM.h: [EEPROM@2.0]
ResolveLibrary(EEPROM.h)
-> candidates: [EEPROM@2.0]
"D:\\Arduino_nightly\\arduino-nightly\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega8 -DF_CPU=16000000L -DARDUINO=10811 -DARDUINO_AVR_ATmega8 -DARDUINO_ARCH_AVR "-ID:\\Arduino_nightly\\arduino-nightly\\Portable\\packages\\MiniCore\\hardware\\avr\\2.0.3\\cores\\MCUdude_corefiles" "-ID:\\Arduino_nightly\\arduino-nightly\\Portable\\packages\\MiniCore\\hardware\\avr\\2.0.3\\variants\\standard" "-ID:\\Arduino_nightly\\arduino-nightly\\Portable\\packages\\MiniCore\\hardware\\avr\\2.0.3\\libraries\\EEPROM\\src" "C:\\Users\\Karanbir\\AppData\\Local\\Temp\\arduino_build_462816\\sketch\\Triac_Control_With_Last_State_Saved1.ino.cpp" -o nul
Alternatives for board_defs.h: [IR_remote@2.2.3]
ResolveLibrary(board_defs.h)
-> candidates: [IR_remote@2.2.3]
"D:\\Arduino_nightly\\arduino-nightly\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega8 -DF_CPU=16000000L -DARDUINO=10811 -DARDUINO_AVR_ATmega8 -DARDUINO_ARCH_AVR "-ID:\\Arduino_nightly\\arduino-nightly\\Portable\\packages\\MiniCore\\hardware\\avr\\2.0.3\\cores\\MCUdude_corefiles" "C:\\Users\\Karanbir\\AppData\\Local\\Temp\\arduino_build_462816/..\\arduino_cache_16334\\core\\core_0f10164349843c0f66764310c7c390d8.a" "-LC:\\Users\\Karanbir\\AppData\\Local\\Temp\\arduino_build_462816" -lm
d:/arduino_nightly/arduino-nightly/hardware/tools/avr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: C:\Users\Karanbir\AppData\Local\Temp\arduino_build_462816/Triac_Control_With_Last_State_Saved1.ino.elf section `.text' will not fit in region `text'
d:/arduino_nightly/arduino-nightly/hardware/tools/avr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: region `text' overflowed by 138 bytes
collect2.exe: error: ld returned 1 exit status
Using library EEPROM at version 2.0 in folder: D:\Arduino_nightly\arduino-nightly\Portable\packages\MiniCore\hardware\avr\2.0.3\libraries\EEPROM
Using library IR_remote at version 2.2.3 in folder: D:\Arduino_nightly\arduino-nightly\Portable\Sketchbook\libraries\IR_remote
exit status 1
Error compiling for board ATmega8.
The error was >9000 character limit so attached the file also
error.txt (15.6 KB)
The error indicates that the sketch uses more memory than the ATmega8 has. If it's the same sketch, I don't know why you would get that with the hourly build but not with Arduino IDE 1.8.10 because they are both using the same toolchain version. The IDE version difference shouldn't affect the compile size. You can save some memory by selecting Tools > Compiler LTO > LTO enabled. I'm not sure if it will be enough.
pert:
The error indicates that the sketch uses more memory than the ATmega8 has. If it's the same sketch, I don't know why you would get that with the hourly build but not with Arduino IDE 1.8.10 because they are both using the same toolchain version. The IDE version difference shouldn't affect the compile size. You can save some memory by selecting Tools > Compiler LTO > LTO enabled. I'm not sure if it will be enough.
The sketch being compiled is same. The only difference is in the include definitions for the library.
1 withd includes written as
#include "src/IRremote/boarddefs.h"
#include "src/IRremote/IRremote.h"
#include "src/IRremote/IRremoteInt.h"
#include "src/IRremote/ir_Lego_PF_BitStreamEncoder.h"
2 with includes written as
#include <board_defs.h>
#include <IR_remote.h>
#include <IR_remoteInt.h>
In 1 the code is compiled with LTO disabled with bootloader and compiles to 3694 bytes.
In 2 the code gives error as in my prev post. However with LTO enabled and without bootloader it compiles to 6604 bytes.
Both are compiled with the hourly build of IDE
This has become intriguing and I think worth looking into.
I already explained to you that you don't need or want all those #include directives. Just add the one #include directive for IR_remote.h or IRremote.h
pert:
I already explained to you that you don't need or want all those #include directives. Just add the one #include directive for IR_remote.h or IRremote.h
Will do this and get back.
The size of memory for the sketch increased because in the other version library, in the IR-remote.h all defines for all protocols were included, on selecting only NEC, there was no need to enable LTO nor was the need to remove the bootloader from the Tools>Board menu.
Thanks pert for your deliberation on this topic.
May be marked as solved.
You're welcome. I'm glad to hear it's working now. Enjoy!
Per