Can't Open xxxxx.elf.spar_setup_call.cgs

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi All,

Receiving the following error message when building.  Can't find a reference to it.  Can someone point me to the documentation for this error so I can correct it?

08:18:10 **** Build of configuration Release for project WICED-Smart-SDK ****

"\\WICED\\WICED-Smart-SDK-2.2.0\\WICED-Smart-SDK\\make.exe" hello_sensor_plus_sleep-BCM920737TAG_Q32

Linking target ELF

OK, made elf.

..\..\Tools\ARM_GNU\bin\Win32\arm-none-eabi-objdump: section '.data' mentioned in a -j option, but not found in any input file

Can't open ../../build/hello_sensor_plus_sleep-BCM920737TAG_Q32-rom-ram-Wiced-release/A_20737A1-hello_sensor_plus_sleep-rom-ram-spar.elf.spar_setup_call.cgs

gcc/rules_cm3_gcc.inc:46: recipe for target '../../build/hello_sensor_plus_sleep-BCM920737TAG_Q32-rom-ram-Wiced-release/A_20737A1-hello_sensor_plus_sleep-rom-ram-spar.elf.spar_setup_call.cgs' failed

  1. make.exe[1]: *** [../../build/hello_sensor_plus_sleep-BCM920737TAG_Q32-rom-ram-Wiced-release/A_20737A1-hello_sensor_plus_sleep-rom-ram-spar.elf.spar_setup_call.cgs] Error 2

make: *** [hello_sensor_plus_sleep-BCM920737TAG_Q32] Error 2

Makefile:344: recipe for target 'hello_sensor_plus_sleep-BCM920737TAG_Q32' failed


Here is the make file:

########################################################################

# Add Application sources here.

########################################################################

APP_SRC = hello_sensor.c

########################################################################

################ DO NOT MODIFY FILE BELOW THIS LINE ####################

########################################################################

APP_PATCHES_AND_LIBS += rtc_api.a


The directory has a modified hello_client.c hello_client.h

Thanks,

Cliff



0 Likes
1 Solution
Anonymous
Not applicable

Hi Vik,

Thanks for the fix.  The issue is that Windows 7.1 has an issue with too many underscores in a filename.  We simply changed the name of the project from hello_sensor_with_sleep to hsws, and it compiled without issue.

Thanks!

Cliff

View solution in original post

0 Likes
13 Replies
VikramR_26
Employee
Employee
25 sign-ins 10 sign-ins 10 comments on KBA

Hi Cliff,

This error is when the cgs file is not generated. Could you share more details on what changes you have made , so we could help you to solve this issue. Complete error message.

thnx

vik86

0 Likes
Anonymous
Not applicable

$ cat diff_hello_sensor_hello_sensor_with_sleep.h_diff

47a48,49

> #define NVRAM_CURRENT_TIME             0x22

>

$ cat diff_hello_sensor_hello_sensor_with_sleep.c_diff

41a42,44

>

> #define RTC_SAMPLE_ENTER_DEEP_SLEEP_AND_ENABLE_TIMED_WAKE

>

49a53,57

> #include "rtc.h"

> #include "miadriver.h"

> #include "devicelpm.h"

> #include <stdbool.h>

> #include "sparcommon.h"

323c331

< UINT8   hello_sensor_stay_connected           = 1;    // Change that to 0 to disconnect when all messages are sent

---

> UINT8   hello_sensor_stay_connected           = 0;    // Change that to 0 to disconnect when all messages are sent

331a340,341

> BOOL wake_reason = 0;;

>

341a352,353

>       wake_reason = mia_isResetReasonTimedWake();

>

344a357,421

> void

> save_current_time()

> {

>       UINT32 current_time;

>       char outbuf[32];

>       RtcTime timebuf;

>       int ret = 0;

>       extern UINT32 restore_current_time();

>

>       rtc_getRTCTime(&timebuf);

>       rtc_RtcTime2Sec(&timebuf, &current_time);

>

>       ble_trace2("save current time %08x %d", current_time, current_time);

>       rtc_ctime(&timebuf, outbuf);

>       ble_trace1("saving time %s", outbuf);

>

>       if (!bleprofile_WriteNVRAM(NVRAM_CURRENT_TIME, 4, &current_time)) {

>               ret++;

>       }

>

>       ble_trace1("number of bad writes ret %d", ret);

>

>       // make sure we can read what we wrote

>

>       restore_current_time();

> }

>

> UINT32

> restore_current_time()

> {

>       UINT32 current_time;

>       int num_tries[4];

>       int ret;

>       int i;

>

>       num_tries[0] = 0;

>       num_tries[1] = 0;

>       num_tries[2] = 0;

>       num_tries[3] = 0;

>

>       for (i = 0; i < 10; i++) {

>               ret = 0;

>

>               if (!num_tries[0]) {

>                       if (!bleprofile_ReadNVRAM(NVRAM_CURRENT_TIME, 4, &current_time)) {

>                               ret++;

>                       } else {

>                               num_tries[0] = 1;

>                       }

>               }

>

>               ble_trace2("%d: number of bad reads ret %d", i, ret);

>

>               if (!ret) {

>                       break;

>               }

>       }

>

>       ble_trace4("%d %d %d %d", num_tries[0], num_tries[1], num_tries[2], num_tries[3]);

>

>       ble_trace2("restore current time %08x %d", current_time, current_time);

>

>       return(current_time);

> }

>

348a426,431

>       RtcTime current_time;

>       char buffer[64];

>       BOOL power_on_reset;

>       UINT32 seconds_asleep = 0;

>       UINT32 sleep_time;

>       UINT32 new_time;

355a439,452

>       if (!mia_isResetReasonPor())

>     {

>         ble_trace0("Waking from deep sleep because the timer went off or a GPIO triggered while waiting for timer to expire.");

>               power_on_reset = false;

>     }

>     else

>     {

>         ble_trace0("Not a timed wake.");

>               power_on_reset = true;

>     }

>

>  // Always clear interrupts on P39, which is the interrupt pin used by the wake-from-deep-sleep HW block.

>     gpio_clearPinInterruptStatus(GPIO_PIN_P39 / GPIO_MAX_NUM_PINS_PER_PORT, GPIO_PIN_P39 % GPIO_MAX_NUM_PINS_PER_PORT);

>

358a456,459

>       // If we need to use the external 32K, then configure the reference

>     // rtcConfig.oscillatorFrequencykHz = RTC_REF_CLOCK_SRC_32KHZ;

>     rtcConfig.oscillatorFrequencykHz = RTC_REF_CLOCK_SRC_128KHZ;

>

413a515,591

>     // Initialize the RTC.

>     rtc_init();

>

>     memset(buffer, 0x00, sizeof(buffer));

>       ble_trace0("Time base is:");

>

>       // RtcTime of 0x00 is the start of RTC time.

>     memset(&current_time, 0x00, sizeof(current_time));

>       rtc_ctime(&current_time, buffer);

>       ble_trace0(buffer);

>

>       // Let year = 2014.

>       current_time.year = 2014;

>       // Let month = july = 6 (jan = 0)

>       current_time.month = 6;

>       // Let day = 1st.

>       current_time.day = 15;

>       // Let current time be 12:00:00 Noon.

>       current_time.hour = 12;

>       current_time.minute = 00;

>       current_time.second = 0x00;

>

>       // If this is a power-on reset, we need to set up the reference time.

>       if (mia_isResetReasonPor())

>       {

>               // Now set the on-chip RTC.

>               if(rtc_setRTCTime(&current_time))

>               {

>                       memset(buffer, 0x00, sizeof(buffer));

>

>                       ble_trace0("Power-on reset, set current time to:");

>                       rtc_ctime(&current_time, buffer);

>                       ble_trace0(buffer);

>               }

>               else

>               {

>                       ble_trace0("Unable to set time.");

>               }

>       }

>       else

>       {

>               // Set up the original reference time instead of using 01/01/2010, 00:00:00 as the reference

>               // because this is a wake from deep sleep. The HW clock keeps running in deep sleep so when

>               // we wake up, the FW needs to know what was used as the original reference time.

>

>               ble_trace1("wake_reason is %d", wake_reason);

>

>               rtc_setReferenceTime(&current_time);

>               ble_trace0("Wake from deep sleep  set current time to:");

>

>               // Get and print current time.

>       rtc_getRTCTime(&current_time);

>       ble_trace0("Current date/time is:");

>       rtc_ctime(&current_time, buffer);

>       ble_trace0(buffer);

>

>               rtc_RtcTime2Sec(&current_time, &seconds_asleep);

>

>               sleep_time = restore_current_time();

>

>               ble_trace1("seconds asleep %d", seconds_asleep);

>

>               new_time = sleep_time + seconds_asleep;

>

>               rtc_sec2RtcTime(new_time, &current_time);

>         rtc_setRTCTime(&current_time);

>

>         rtc_getRTCTime(&current_time);

>         ble_trace0("New date/time is:");

>         rtc_ctime(&current_time, buffer);

>         ble_trace0(buffer);

>

>               if (!wake_reason) {

>                       gpio_clearPinInterruptStatus(0, GPIO_BUTTON);

>               }

>       }

>

450a629,636

>

>       if (!power_on_reset) {

>               if (!wake_reason) {

>                       bleprofile_LEDBlink(250, 250, 10);

>               } else {

>                       bleprofile_LEDBlink(125, 125, 20);

>               }

>       }

517a704,745

> void

> enter_deep_sleep()

> {

>       wake_reason = 0;

>

>       ble_trace0("Entering deep sleep.");

>

>       gpio_configurePin(0, 0, 0x100, 0);

>

>       // Configure the low power manager to enter deep sleep.

>       devLpmConfig.disconnectedLowPowerMode = DEV_LPM_DISC_LOW_POWER_MODES_HID_OFF;

>

>       // Configure the wake time in mS.

>       devLpmConfig.wakeFromHidoffInMs = 10000; // 5000;

>

>       // Configure the reference clock to use.

>

>       // Use the external 32k.

>       // devLpmConfig.wakeFromHidoffRefClk = HID_OFF_TIMED_WAKE_CLK_SRC_32KHZ;

>       devLpmConfig.wakeFromHidoffRefClk = HID_OFF_TIMED_WAKE_CLK_SRC_128KHZ;

>

>       // from Markus - makes no difference

>       // devlpm_enableWakeFrom(DEV_LPM_WAKE_SOURCE_GPIO);

>

>       // from Milt

>       // gpio_configurePin(0, LHL_GPIO_P?? , GPIO_EN_INT_RISING_EDGE, GPIO_PIN_OUTPUT_LOW);   //   You have to use the LHL GPIO, not the button abstraction.

>

>       // Enter deep-sleep now. Will not return.

>

>

>       gpio_inputDisableAll();

>

>       gpio_configurePin(25 / 16, 25 % 16, GPIO_EN_INT_BOTH_EDGE, GPIO_PIN_OUTPUT_HIGH);

>

>       devlpm_enableWakeFrom(DEV_LPM_WAKE_SOURCE_GPIO);

>

>

>       // from Cliff

>       // devlpm_enterLowPowerMode();

>       bleprofile_PrepareHidOff();

> }

>

536a765,767

>

>       save_current_time();

>       enter_deep_sleep();

558c789

<     ble_trace1("hello_sensor_timeout:%d\n", hello_sensor_timer_count);

---

>     // ble_trace1("hello_sensor_timeout:%d\n", hello_sensor_timer_count);

762a994

>     bleprofile_BUZBeep(bleprofile_p_cfg->buz_on_ms);

cliff@CLIFF-ASUS-LT ~/Documents/_clfdat/_TimerCap/source_code/WICED/WICED-Smart-SDK-2.2.0/WICED-Smart-SDK/Apps

0 Likes
Anonymous
Not applicable

and the complete error message:

09:20:43 **** Build of configuration Release for project WICED-Smart-SDK ****

"C:\\Users\\cliff\\Documents\\_clfdat\\_TimerCap\\source_code\\WICED\\WICED-Smart-SDK-2.2.0\\WICED-Smart-SDK\\make.exe" hello_sensor_plus_sleep-BCM920737TAG_Q32

Compiling spar_setup.c

Compiling hello_sensor.c

Compiling sparinit.c

../../Apps/hello_sensor_plus_sleep/hello_sensor.c: In function 'save_current_time':

../../Apps/hello_sensor_plus_sleep/hello_sensor.c:371:2: warning: passing argument 2 of 'ble_trace1' makes integer from pointer without a cast [enabled by default]

../../include/bleapp.h:195:13: note: expected 'UINT32' but argument is of type 'char *'

../../Apps/hello_sensor_plus_sleep/hello_sensor.c:373:2: warning: passing argument 3 of 'bleprofile_WriteNVRAM' from incompatible pointer type [enabled by default]

../../include/bleprofile.h:758:7: note: expected 'UINT8 *' but argument is of type 'UINT32 *'

../../Apps/hello_sensor_plus_sleep/hello_sensor.c: In function 'restore_current_time':

../../Apps/hello_sensor_plus_sleep/hello_sensor.c:401:4: warning: passing argument 3 of 'bleprofile_ReadNVRAM' from incompatible pointer type [enabled by default]

../../include/bleprofile.h:738:7: note: expected 'UINT8 *' but argument is of type 'UINT32 *'

../../Apps/hello_sensor_plus_sleep/hello_sensor.c: In function 'hello_sensor_create':

../../Apps/hello_sensor_plus_sleep/hello_sensor.c:588:4: warning: large integer implicitly truncated to unsigned type [-Woverflow]

Compiling lib_installer.c

Linking target ELF

OK, made elf.

..\..\Tools\ARM_GNU\bin\Win32\arm-none-eabi-objdump: section '.data' mentioned in a -j option, but not found in any input file

Can't open ../../build/hello_sensor_plus_sleep-BCM920737TAG_Q32-rom-ram-Wiced-release/A_20737A1-hello_sensor_plus_sleep-rom-ram-spar.elf.spar_setup_call.cgs

gcc/rules_cm3_gcc.inc:46: recipe for target '../../build/hello_sensor_plus_sleep-BCM920737TAG_Q32-rom-ram-Wiced-release/A_20737A1-hello_sensor_plus_sleep-rom-ram-spar.elf.spar_setup_call.cgs' failed

make.exe[1]: *** [../../build/hello_sensor_plus_sleep-BCM920737TAG_Q32-rom-ram-Wiced-release/A_20737A1-hello_sensor_plus_sleep-rom-ram-spar.elf.spar_setup_call.cgs] Error 2

Makefile:344: recipe for target 'hello_sensor_plus_sleep-BCM920737TAG_Q32' failed

make: *** [hello_sensor_plus_sleep-BCM920737TAG_Q32] Error 2

09:20:48 Build Finished (took 4s.689ms)

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Attached is the entire project.  Thought it might help if you can compile it yourself.

0 Likes

Hi Cliff,

I took your attached source code and had no issues in compiling, could you answer these, so we could help you debug

1) Operating system-  Win 7/linux/mac

2) Did you install the WICED SMART SDK 2.2.0 ?

3) Are you able to compile and download other sample apps in the SDK ?

4) Could you share the screenshot of your make target window and also your project explorer.

Sorry to ask you so much info, since I  did not get any error on compiling the source you have attached. Below is my log attached.

3:41:16 **** Build of configuration Release for project WICED-Smart-SDK ****

"C:\\Users\\vik86\\Documents\\WICED\\WICED-Smart-SDK-2.2.0\\WICED-Smart-SDK\\make.exe" hello_sensor_plus_sleep-BCM920737TAG_Q32 download

Linking target ELF

OK, made elf.

..\..\Tools\ARM_GNU\bin\Win32\arm-none-eabi-objdump: section '.data' mentioned in a -j option, but not found in any input file

Call to hello_sensor_plus_sleep_spar_crt_setup @ 002060e1

OK, made C:/Users/vik86/Documents/WICED/WICED-Smart-SDK-2.2.0/WICED-Smart-SDK/Wiced-Smart/spar/../../build/hello_sensor_plus_sleep-BCM920737TAG_Q32-rom-ram-Wiced-release/A_20737A1-hello_sensor_plus_sleep-rom-ram-spar.cgs. MD5 sum is:

dd6c82ce1a0921391db27d9714849724 *../../build/hello_sensor_plus_sleep-BCM920737TAG_Q32-rom-ram-Wiced-release/A_20737A1-hello_sensor_plus_sleep-rom-ram-spar.cgs

--------------------------------------------------------------------------------

Patches start at                  0x00204568 (RAM address)

Patches end at                    0x0020537C (RAM address)

Application starts at             0x00204FD0 (RAM address)

Application ends at               0x002060CD (RAM address)

Patch size (including reused RAM)       3604 bytes

Patch size                              2664 bytes

Application size                        4349 bytes

                                      ------

Total RAM footprint                     7013 bytes (6.8kiB)

--------------------------------------------------------------------------------

Converting CGS to HEX...

Conversion complete

Creating OTA images...

Conversion complete

OTA image footprint in NV is 9022 bytes

Detecting device...

Device found

Downloading application...

Download complete

Application running

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

1) Win 7 SP1 64-bit

2) WICED-Smart-2.2.0

3) I build Apps all the time and have not had any other issues.

4) attached

0 Likes

Hi Cliff,

Sorry for delayed response. The third bullet I requested was. Can you compile and download other applications that come with the SDK with the setup you have ? Have you tried compiling the hello_client or hello_sensor applications ? Does that compile good ? If Yes then I would request you to create a new application folder of your attached code and try again. Since I mentioned I took your attached source code and had no issue in compiling and downloading.


Thanks,

vik86

0 Likes
Anonymous
Not applicable

Hi Vik,

I should have covered all of the things I had previously tried, even before I submitted this issue:

1) I can compile and link hello_client and hello_sensor without issue (just validated again).

2) This code compiles and links fine on my colleague's Mac.

3) My colleague tarred his directory of the code that he had no issue with, I deleted the one of my windows box, untarred the one he gave me, deleted the previous build_target, copy and pasted a new Build_target - no success.

4) My colleague is able to send me his build directory and I can download it to the board without issue

Cliff

0 Likes

Ok sounds good. Have you tried running clean? and then tried it ?

thnx

vik86

0 Likes
Anonymous
Not applicable

Hi Vik,

Yes, I have tried "make clean".

Cliff

0 Likes

Hi Cliff,

We realized that you had a naming issue in the make file with your application name having "hello_sensor_plus_sleep", on changing your application name to "hsps" you were able to compile and download the application to Tag03.

If you have any other issues kindly let us know.

thnx

Vik86

0 Likes
Anonymous
Not applicable

Hi vik86

Not being able to compile this is causing some pain.  Do you or does anyone else have any ideas or suggestions?

Thanks!

0 Likes
Anonymous
Not applicable

Hi Vik,

Thanks for the fix.  The issue is that Windows 7.1 has an issue with too many underscores in a filename.  We simply changed the name of the project from hello_sensor_with_sleep to hsws, and it compiled without issue.

Thanks!

Cliff

0 Likes