Author |
Message |
Topic: Out of ROM, A segment or the program is too large |
kgng97ccs
Replies: 18
Views: 15922
|
Forum: General CCS C Discussion Posted: Wed Jan 03, 2024 7:16 am Subject: Out of ROM, A segment or the program is too large |
Thank you, Ttelmah. I see your point.
For a moment, I forgot that RAM is volatile memory. |
Topic: Out of ROM, A segment or the program is too large |
kgng97ccs
Replies: 18
Views: 15922
|
Forum: General CCS C Discussion Posted: Wed Jan 03, 2024 5:39 am Subject: Out of ROM, A segment or the program is too large |
I have managed to get the ROM usage down to 95% (from 100%) by doing the following (I have “opt compress” in my code).
1. Abbreviating some text in fprintf() statements.
2. Consolidating sequent ... |
Topic: Out of ROM, A segment or the program is too large |
kgng97ccs
Replies: 18
Views: 15922
|
Forum: General CCS C Discussion Posted: Tue Jan 02, 2024 12:39 am Subject: Out of ROM, A segment or the program is too large |
Thank you, Newguy and Ttelmah. Yes, the example helps.
1. If I am passing a string constant declared in an array, I will not need to use the directive “#device PASS_STRINGS=IN_RAM”. Is this cor ... |
Topic: Out of ROM, A segment or the program is too large |
kgng97ccs
Replies: 18
Views: 15922
|
Forum: General CCS C Discussion Posted: Mon Jan 01, 2024 3:51 am Subject: Out of ROM, A segment or the program is too large |
Thank you, everyone, for your ideas.
So far, by shortening the text in fprintf statements by using abbreviations for some words, I have managed to get the ROM usage down to 97% (not much, but at le ... |
Topic: Out of ROM, A segment or the program is too large |
kgng97ccs
Replies: 18
Views: 15922
|
Forum: General CCS C Discussion Posted: Sat Dec 30, 2023 7:20 am Subject: Out of ROM, A segment or the program is too large |
Thank you, Ttelmah and Temtronic.
My code can now compile, but with 99% ROM usage (I removed a function that is not called):
Memory usage: ROM=99% RAM=61% - 67%
I am still looking into h ... |
Topic: Out of ROM, A segment or the program is too large |
kgng97ccs
Replies: 18
Views: 15922
|
Forum: General CCS C Discussion Posted: Sat Dec 30, 2023 3:33 am Subject: Out of ROM, A segment or the program is too large |
I am using the PIC18LF46K22 MCU, MPLAB IDE v8.92, and CCS C compiler v5.115.
I am referencing this helpful reply from Ttelmah regarding optimizing code (https://ccsinfo.com/forum/viewtopic.php?t=59 ... |
Topic: Using the watchdog timer |
kgng97ccs
Replies: 5
Views: 12448
|
Forum: General CCS C Discussion Posted: Wed Jun 28, 2023 1:56 am Subject: Using the watchdog timer |
Thank you, Ttelmah.
1. Is there a CCS statement I can use to check, at any time, whether the watchdog timer is enabled (ON) or not (OFF)?
2. Is there a CCS statement I can use to check, at any t ... |
Topic: Using the watchdog timer |
kgng97ccs
Replies: 5
Views: 12448
|
Forum: General CCS C Discussion Posted: Sun Jun 25, 2023 4:35 am Subject: Using the watchdog timer |
Thank you, Ttelmah, for your input.
From some testing, I observed the following:
1. If NOWDT is explicitly placed in the fuses, there seems to be no way to turn ON the watchdog timer.
2. Once WDT ... |
Topic: Counting number of MCU resets |
kgng97ccs
Replies: 8
Views: 14699
|
Forum: General CCS C Discussion Posted: Sat Jun 17, 2023 6:09 am Subject: Counting number of MCU resets |
Thank you, Ttelmah.
1. Currently, button2 is used to perform a certain function if it is pressed for at least 3 seconds:timeout_ct = 0;
while (input(button2_pin)==0 && timeo ... |
Topic: Counting number of MCU resets |
kgng97ccs
Replies: 8
Views: 14699
|
Forum: General CCS C Discussion Posted: Fri Jun 16, 2023 10:34 pm Subject: Counting number of MCU resets |
I am using the PIC18LF46K22 MCU, CCS C compiler v5.115, and MPLAB IDE v8.92.
I would like to count the number of resets that happen after a device has been put into operation. This number will be i ... |
Topic: Using the watchdog timer |
kgng97ccs
Replies: 5
Views: 12448
|
Forum: General CCS C Discussion Posted: Sun Apr 16, 2023 4:51 am Subject: Using the watchdog timer |
I am using the PIC18LF46K22 MCU and CCS C compiler v5.115 under MPLAB IDE v8.92.
I am trying to understand the various ways in which the watchdog timer for this MCU can be set up.
Here is what I ... |
Topic: Using setup_spi |
kgng97ccs
Replies: 3
Views: 10644
|
Forum: General CCS C Discussion Posted: Tue Apr 11, 2023 1:20 am Subject: Using setup_spi |
Thank you, PCM Programmer and Ttelmah, for your input.
The SPI peripheral is fed with the master oscillator/4.
The setup sets the prescaler _from this_.
So selecting a prescaler of /4, sets the ... |
Topic: Using setup_spi |
kgng97ccs
Replies: 3
Views: 10644
|
Forum: General CCS C Discussion Posted: Sun Apr 09, 2023 10:04 pm Subject: Using setup_spi |
We have an old program that uses the PICF45K20 MCU and has the following statement:setup_spi(SPI_MASTER | SPI_CLK_DIV_4 | SPI_SS_DISABLED | SPI_L_TO_H);
Immediately after the statement, we se ... |
Topic: Minimizing accidental MCLR resets |
kgng97ccs
Replies: 2
Views: 8824
|
Forum: General CCS C Discussion Posted: Sat Feb 04, 2023 12:29 am Subject: Minimizing accidental MCLR resets |
I am using the PIC18LF46K22 MCU, MLAB IDE v8.92, and CCS C compiler v5.113.
Is there any way to make, through software, the MCU start an external reset only if the reset (MCLR) pin is low for a per ... |
Topic: Using bootloaders |
kgng97ccs
Replies: 4
Views: 12069
|
Forum: General CCS C Discussion Posted: Sat Jan 28, 2023 4:51 am Subject: Using bootloaders |
I am using the PIC18LF46K22 MCU, MPLAB IDE v8.92, and CCS C compiler v5.113.
I am new to bootloaders, and I am trying to understand what a bootloader can do in comparison with what I can do in MPLA ... |
|