Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Particle platform compatibility #48

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

niabassey
Copy link
Contributor

@niabassey niabassey commented Jan 13, 2024

I haven't done much platform porting so I'm not exactly sure the most correct way to fix this, but casting data uint8_t* to char* resolves the Particle Workbench compiler error:
invalid conversion from 'uint8_t*' {aka 'unsigned char*'} to 'char*'

I would guess a next step would be to dig into DeviceOS serial handling but maybe someone can comment and save me the blind effort.

If this is an acceptable solution, or if it's safe to cast to char * for all platforms I'd like to see it merge into main so the library will drop into Particle Workbench without having to track changes. Comments?

I haven't done much platform porting so I'm not exactly sure the most correct way to fix this, but casting data uint8_t* to char* resolves the compiler error:
 invalid conversion from 'uint8_t*' {aka 'unsigned char*'} to 'char*' 

I would guess the right next step is to dig into DeviceOS serial handling but maybe someone can comment.

If this is an acceptable solution, or if it's safe to cast to char * for all platforms I'd like to see it merge into main so I don't have to remember it in the future.
Adjusted whitespace
@PaulZC
Copy link
Collaborator

PaulZC commented Jan 15, 2024

Hi Nia (@niabassey ),

Sure, we can merge this...

Best wishes,
Paul

@PaulZC PaulZC merged commit 9ca3b04 into sparkfun:main Jan 15, 2024
10 checks passed
@niabassey
Copy link
Contributor Author

 *  Executing task in folder c%3A%5CUsers%5CNiaB%5CRepositories%5CParticle_P2_SFGNSSv3_Tests: make -f 'C:\Users\NiaB\.particle\toolchains\buildscripts\1.15.0\Makefile' compile-user -s 
:::: COMPILING APPLICATION
Creating c:/Users/NiaB/Repositories/5CParticle_P2_SFGNSSv3_Tests/target/5.6.0/p2/memory_platform_user.ld ...
Creating c:/Users/NiaB/Repositories/5CParticle_P2_SFGNSSv3_Tests/target/5.6.0/p2/memory_platform_user.ld ...
   text    data     bss     dec     hex filename
  60698     128    1878   62704    f4f0 c:/Users/NiaB/Repositories/5CParticle_P2_SFGNSSv3_Tests/target/5.6.0/p2/5CParticle_P2_SFGNSSv3_Tests.elf
*** COMPILED SUCCESSFULLY ***
 *  Press any key to close the terminal. 

Thanks Paul!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants