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

Can this convert header from keil to sdcc? #1

Open
physxz opened this issue Jan 22, 2022 · 4 comments
Open

Can this convert header from keil to sdcc? #1

physxz opened this issue Jan 22, 2022 · 4 comments

Comments

@physxz
Copy link

physxz commented Jan 22, 2022

Keil has a header called intrins.h. I want to convert this keil file to the format of sdcc, and use the function in it. I tried many ways but none of the worked.
Here's the header:

/*--------------------------------------------------------------------------
INTRINS.H
Intrinsic functions for C51.
Copyright (c) 1988-2004 Keil Elektronik GmbH and Keil Software, Inc.
All rights reserved.
--------------------------------------------------------------------------*/

#ifndef __INTRINS_H__
#define __INTRINS_H__

extern void          _nop_     (void);
extern bit           _testbit_ (bit);
extern unsigned char _cror_    (unsigned char, unsigned char);
extern unsigned int  _iror_    (unsigned int,  unsigned char);
extern unsigned long _lror_    (unsigned long, unsigned char);
extern unsigned char _crol_    (unsigned char, unsigned char);
extern unsigned int  _irol_    (unsigned int,  unsigned char);
extern unsigned long _lrol_    (unsigned long, unsigned char);
extern unsigned char _chkfloat_(float);
extern void          _push_    (unsigned char _sfr);
extern void          _pop_     (unsigned char _sfr);

#endif

Any suggestion? Thanks a lot!

@physxz
Copy link
Author

physxz commented Jan 22, 2022

I tried your tool, but it seems don't work for me.

@CSY-tvgo
Copy link
Owner

Hi. Currently, this tool can be mainly used to convert application-level code and header files of some MCUs.
However, intrins.h is a header file related to compilers, while Keil's compiler is different from SDCC, so you might convert it manually.

@CSY-tvgo
Copy link
Owner

@physxz
Copy link
Author

physxz commented Jan 28, 2022

First of all, thank you for your time. I've read all these posts already. But honestly I don't konw how to do it since I'm not a professional guy. The SDCC Compiler User Guide is no easy to read too. I met a new problem yesterday. The printf() function. I think I'm gonna use keil instead if I can't conquer this trouble today. It's too hard for some aspect for a newbee.

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

No branches or pull requests

2 participants