Re: How to include a .DLL?
There is no easy way to include Dynamic-link library, it could be done, but...
There is easy way to include static-link library. Just look up for my bootloader posts, and explanation how to pass variables between main app and bootloader.
Re: How to include a .DLL?
Quote:
Originally Posted by
pedja089
There is no easy way to include Dynamic-link library, it could be done, but... There is easy way to include static-link library. Just look up for my bootloader posts, and explanation how to pass variables between main app and bootloader.
Seems like there are lots of bootloader posts that you are involved.But I think bootloader is the way to go. Is there any example for reading data/including code from bootloader to main code?
Re: How to include a .DLL?
There is. I can't remember topic name. In that topic I explained how variables can be shared between main app and bootloader.
Re: How to include a .DLL?
Re: How to include a .DLL?
Can I ask you what you are trying to accomplish?
Re: How to include a .DLL?
ditto the last post. Why would you want to include pre-compiled code when its so much easier to include the source and compile the whole thing.
DLL's are commonly used to implement third party functions. The operating system controls initialization and there is a mutually understood way of defining and passing parameters. Non of these thing apply in this case.
I'm sure it's possible but the real question is why?
Re: How to include a .DLL?
The purpose is to have an open source code that part of it is encrypted. So I don't want to release part of it.Either using an object file,DLL, or code in bootloader and then call it from main code.
Re: How to include a .DLL?
If you don't want to provide the source, how can it be open source?
Re: How to include a .DLL?
Quote:
Originally Posted by
towlerg
If you don't want to provide the source, how can it be open source?
Most of it will be open source but I don't want to open source small part of it dealing with USB.So basically I want to release the source code but not one of include files.
Re: How to include a .DLL?
Forget about that...
First you can easily dissemble hex file, and get that ASM code. Second, how PIC will execute commands if they are encrypted. Any way you must write original source code to FLASH if you want to execute it.
So even if code is loaded in flash encrypted, and then decrypt in pic and wrote to FLASH again, just run your code in some simulator, and look FLASH content...
I don't want to be rude, but open source with hidden source is plain stupid...
Re: How to include a .DLL?
I don't want to be rude either but pedja089 realy does have a point. It's either open sorce or its not (like being a little bit dead)
Re: How to include a .DLL?
I don't mind if they dissemble the hex.I just don't want it to be too easy to simply read the code.As far as I can call a function in Bootloader then I am fine.I am a bit new to bootloader but can I upload two hex files to MCU? or second hex should be done through bootloader?
Re: How to include a .DLL?
There is some programmers that would you probably allow you to load two hex...
I always put precompiled bootloader at end of main app and every thing i need for production is in one HEX.
Re: How to include a .DLL?
You can create C++ app that references the DLL file.