Closed Anobium closed 4 years ago
Hi Anobium, I also used XC8 V1.45 Pro. Double check I didn't leave a code offset in the project settings for the MSD example. I tested these examples using a USB bootloader. Also double check in the output when you compile that PRO optimisation is actually being used. Check optimise for space. Not at a computer right now to check it sorry.
Very grateful. Still no progress here.
I am compiling to create this file as follows. MSD_Examples/MSD_Internal_Example/PIC16F145X.X I am assuming MSD_examples is correct the code. Is this correct? : ..USB-Stack-master/USB-Stack-master/USB_Stack_Examples/MSD_Examples/MSD_Internal_Example/PIC16F145X.X/dist/PIC16F1454_PRO/production/PIC16F145X.X.production.hex...
I have loaded the HEX into PK2 GUI. The code is still exceeds 0x1000 as cab be seen in the picture.
If I compare to your HEX....which is correct.
What school boy error am I making?
Hmm, not sure what's doing that. I'd check to make sure your version of XC8 is fully licensed (Pro), that's the most likely cause. Even if you select pro, it may still not be optimised. The output window should tell you after a compilation. This MSD Internal example for PIC16F145X only works on the pro licensed version of XC8, the memory is very tight on this chip. In XC8 Global Options->XC8 Linker->Rom Ranges make sure "0-7FF,800-FFF" is there. If your code can't fit in the Rom Ranges it should have an error on compilation. Did an error occur?
Also leave FLASH_SPACE_START = 0x01000 and END_OF_FLASH = 0x02000 in main.c.
Cheers. No progress,
Checked a main():
Checked Rom ranges:
Checked Pro mode: See outoput.txt.
Check optimisation changes in 1.45 Release note: No change,
Most odd... what is different?
Very strange. Is this a clean copy of the example or modified? If modified, send me a copy of your project and I'll try work it out.
Since you messaged me I've been in the process of updating this library. I have a version here that support's the latest compiler v2.2.0 and C99. Let me know if that would be helpful.
John.
Best if I share the goal - it will help.
I develop Great Cow BASIC. An Open Source compiler for PIC and AVR. We have users in, truly, Africa who use Great Cow BASIC for education. The challenge is providing a solution that is very, very low cost.
So, Great Cow BASIC cannot address beyond 0x1000. This is a hard coded limitation. Never really thought the Bootload would not sit outside the first page.
This may explain why the ask for 16F1454 that has less functionality, and, looking for a bootloader is about 0x800.
So, if you think that 0x800 is just not achievable then I should give up and not waste anymore of you time.
Your thoughts on the challenge?
Sorry I'm a little lost. So you're wanting to make a bootloader using MSD Internal Example as a starting point? Is it the unchanged example that won't compile lower than 0x1000 or your application/bootloader? Why the limitation of 0x800? Your saying because your compiler can't address beyond 0x1000? If I understand right, you want 0x000 to 0x800 your bootloader, 0x800 to 0x1000 is user space and 0x1000 to 0x2000 is unusable space due to Cow BASIC limitation? I don't think my USB uC/USB stack can fit in 0x800 words. It was difficult fitting it into 0x1000. I'll have a look tomorrow and see if USB uC bootloader for 16F145X can be made smaller.
Sorry to confuse.
The posts with the reports are the stock downloaded not changed. So, that an issue here - It may not be be at your end.
The Great Cow BASIC constraints. Great Cow BASIC page handler assumes that page 0 is available. When Hugh wrote the compiler (11 years ago, he was 13!!) that was his assumption. So, 0x800 is workable within Great Cow BASIC but I understand this may be difficult.
Thank you for looking.
Hey, I've uploaded the source code for the 145X bootloader on my USB uC repository... I tried to get the code size as small as possible but only achieved down to 3,935 (0xF5F) words used, 161 (0xA1) free. I have my doubts this bootloader could ever fit in less than one page 0x800, especially written in C... I have seen others write really small USB bootloaders in assembly, CDC, HID and DFU in 512 words or less. Quick google search and you'll find them.
Sorry I couldn't be more help.
John.
John,
Thank you so much for trying. Truly grateful. I owe you – want a free license to PICKitPlus as a trade for your time?
Option are give up or rewrite a major part of Great Cow BASIC.
Again, thank you.
Evan
To solve your Microchip PIC programming problems – use PICKitPlus for the PICKit2 and PICKt3 programmers. See http://www.pickitplus.co.uk www.pickitplus.co.uk
Brain logo with white stroke 100x100
Anobium Business Services Limited - Registered Office: Anobium House, Bramley, Surrey, UK GU5 0DP- Registered in England No: 12232398.
Anobium Business Services Limited -- This message is transmitted to you by or on behalf of Anobium Business Services Limited. It is intended exclusively for the addressee. The substance of this message, along with any attachments, may contain proprietary, confidential or privileged information or information that is otherwise legally exempt from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate any part of this message. If you have received this message in error, please destroy and delete all copies and notify the sender by return e-mail. Regardless of content, this e-mail shall not operate to bind Anobium Business Services Limited to any order or other contract unless pursuant to explicit written agreement or written initiative expressly permitting the use of e-mail for such purpose.
From: John Izzard [mailto:notifications@github.com] Sent: 01 July 2020 05:53 To: johnnydrazzi/USB-Stack Cc: Anobium; Author Subject: Re: [johnnydrazzi/USB-Stack] Build (#1)
Hey, I've uploaded the source code for the 145X bootloader on my USB uC repository... I tried to get the code size as small as possible but only achieved down to 3,935 (0xF5F) words used, 161 (0xA1) free. I have my doubts this bootloader could ever fit in less than one page 0x800, especially written in C... I have seen others write really small USB bootloaders in assembly, CDC, HID and DFU in 512 words or less. Quick google search and you'll find them.
Sorry I couldn't be more help.
John.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/johnnydrazzi/USB-Stack/issues/1#issuecomment-652189090 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AEI2IQ6WZNSCGBFVROEIJ4DRZK6LHANCNFSM4NF6FH4Q . https://github.com/notifications/beacon/AEI2IQYSYVRQINXOUHD35ELRZK6LHA5CNFSM4NF6FH42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE3PZ3IQ.gif
Great project.
Johnny trying to rebuild.
Using Microchip Technology PIC PRO Macro Assembler V1.45 build Cx8. What did you use?
Not getting a HEX that fits in the 0x1000 for the 16f1454.
I am trying to build the MSD that fits in less than 0x7DB - Do you think this is possible? What could be removed to get it in 0x7DB?
Thank you so much.