sorry yes i've got it working now. I was grateful you suggested where to start looking rather than giving me working code as I have learnt so much more by working it out myself. I have never used assembly other than to run say a few instructions in a C environment. eg asm{bcf TRISC, 1; bsf PORTC, 1;}
I assume that not understanding bank switching is fairly low on the assembler ability scale and sometimes on forums you get made fun of and told to quit what you are doing "if you don't know something as basic as that", so I appreciate your helpfulness and now I have something useful and relevant from which to learn a new skill.
I am struggling trying to get the code to run on a PIC18F14K50 and would really appreciate any help at all. I have attached a zip with my 2nd attempt, 2 'USBTrace' Logs and a uart debug output file.
The 'USBTrace' Logs show a successful connection to a PIC18F4550 device (a Tiertex dev board) and an unsuccessful attempt to a Microchip Low Pin Count Dev Board.
The UART Debug Output file contains to UART output for both the 4550 and 14K50.
The code I have attached has modifications (from this topics origional 2550 code) to the linker script (USB ram Allocation), the size of the 'SetUpPkt' and control transfer array and some of the RAM address' associated with USB data. I have marked them as !MODIFIED!
I have stripped back all the mods I have tried to this 2nd attempt as nothing I did in the first made any difference.
I do not have a great deal of experience with assembler but I cannot see what is different from the working 2550/4550 code and the not working 14K50 code other than the memory allocations. I have also checked the linker map output file for both setups and also the working HID bootloader in the Microchip examples and have tried several configurations of array sizes for those mentioned above. I have even gone through the HID example C code and checked in back against the 2550 assembler and where I have found differences I have modified the assembler but as none of this changed anything i haven't included it in the zip. If anybody would like to look at it I could upload that also.
I am not just asking for my problem to be solved for me, I would really like to understand what the problem is and why I have missed it. I am used to C and generally have had little experience with linker scripts and such (usually the C compiler just sorts everything out) but I am keen to learn.
Once again any help at all would be greatfully received.