/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Problem, Ride7 when passing a struct to a function

Username:     
Password:     
             

Forum

# 1   2009-03-11 09:32:50 Problem, Ride7 when passing a struct to a function

sima
Member
Registered: 2008-12-10
Posts: 16

Problem, Ride7 when passing a struct to a function

I'm passing a struct to a function but the function doesn't receive the struct (I can se that when debugging).

I see in the ST firmware library that they like to use pointers to structs as arguments to functions.

Are there some limitations in the Ride7 IDE compiler when handling structs as function arguments?

Offline

 

# 2   2009-03-11 09:48:09 Problem, Ride7 when passing a struct to a function

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Problem, Ride7 when passing a struct to a function

No, passing struct belongs to the standard (even if it is not recommended, above all for large structures that have to be pushed onto the stack).
Note that the optimization makes sometimes wrong the visualization while debugging. It could be just a problem of visualization.

Offline

 

# 3   2009-03-11 10:16:58 Problem, Ride7 when passing a struct to a function

sima
Member
Registered: 2008-12-10
Posts: 16

Re: Problem, Ride7 when passing a struct to a function

I will use pointers as arguments for now to be safe. And they are faster to pass.

Thanks!

Offline

 

Board footer