Reply
Posts: 48
Registered: ‎11-07-2015

EFM32ZG and Simplitcity Studio. Problem with pointer to bool function

I have own driver for si4463

 

Now I integrate this driver for EFM32ZG. And I have problem with following code in si4463.h

 

typedef struct
{
	void (*WriteRead)(uint8_t * pTxData, uint8_t * pRxData, uint16_t txSize);
	void (*SetShutdown)(void);
	void (*ClearShutdown)(void);
	void (*Select)(void);
	void (*Deselect)(void);
	void (*DelayMs)(uint32_t delayMs);
	bool (*IsCTS)(void);
	//bool (*IsClearToSend)(void);
	si4463_interrupts_t interrupts;
	si4463_chip_status_t chipStatus;
} si4463_t;

exactly with bool (IsCTS)(void);

 

Everything is works for STM32 project (Eclipse-based IDE, GCC). If I try to compile the project in the Simplicity Studio I get:

fieldCTS.PNG

 

In si4463 method could not be resolved too.

 

Next I tried change type of function pointer from bool to uint8_t. Nothing changes.

 

Next I comment this pointer and create new with different name:

typedef struct
{
	void (*WriteRead)(uint8_t * pTxData, uint8_t * pRxData, uint16_t txSize);
	void (*SetShutdown)(void);
	void (*ClearShutdown)(void);
	void (*Select)(void);
	void (*Deselect)(void);
	void (*DelayMs)(uint32_t delayMs);
	//uint8_t (*IsCTS)(void);
	bool (*IsClearToSend)(void);
	si4463_interrupts_t interrupts;
	si4463_chip_status_t chipStatus;
} si4463_t;

And I get the same error - "could not be resolved". Ok

 

After change name I change type to uint8_t and... errors dissapear Cat Surprised At this point I can finish compile.

 

My question - why it happens?

 

_____________________
Best regards,
Danil Borchevkin,
Owner Lab409.ru
Posts: 563
Registered: ‎09-18-2015

Re: EFM32ZG and Simplitcity Studio. Problem with pointer to bool function

Hi @DanilBorchevkin,

 

I'm not sure what's going on here.

 

Normally, "could not be resolved" messages occur when you're using a .h file that's not in the project's include search paths:

 

studio_proj_includes.png

 

I looked at your driver, and your si4463.h is also where you include stdint.h and stdbool.h. So, maybe if si4463.h isn't in the project's include search paths, it's not including stdint.h but stdbool.h is included elsewhere thus the "could not resolve" problem being fixed?

 

It's the best guess I have.

 

John

Posts: 48
Registered: ‎11-07-2015

Re: EFM32ZG and Simplitcity Studio. Problem with pointer to bool function

Hi @JohnB

 

I'm not sure what's going on here. - I'm tooCat Frustrated

 

About including paths - I know that and double ckecked it. I placed si4463.h into ${ProjPathDir}/inc and it path was included:

 

include.PNG 

 

_____________________
Best regards,
Danil Borchevkin,
Owner Lab409.ru
Posts: 563
Registered: ‎09-18-2015

Re: EFM32ZG and Simplitcity Studio. Problem with pointer to bool function

Hi Danil,

 

Have you ever switched between the Debug and Release configurations? If you customized the settings for one, they don't carry over to the other unless you selected the [ All Configurations ] option.

 

John

Highlighted
Posts: 48
Registered: ‎11-07-2015

Re: EFM32ZG and Simplitcity Studio. Problem with pointer to bool function

@JohnB I didn't switch configuration. Work only on debug

_____________________
Best regards,
Danil Borchevkin,
Owner Lab409.ru