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

host.uvproj missed tusbh_cdc_*.c in source list #10

Open
banxian opened this issue Jun 17, 2020 · 2 comments
Open

host.uvproj missed tusbh_cdc_*.c in source list #10

banxian opened this issue Jun 17, 2020 · 2 comments

Comments

@banxian
Copy link

banxian commented Jun 17, 2020

hi, I found MDK-ARM project inside demo/host folder failed to compile.
maybe you forgot to add tusbh_cdc_acm.c and tusbh_cdc_rdnis.c into usb_host group.

@xtoolbox
Copy link
Owner

I'll check it, the mdk project file is not fully tested

@banxian
Copy link
Author

banxian commented Jun 29, 2020

in retarget.c the compiler define should be "#if !defined ( __CC_ARM )"
because if enanble gnu in keil mdk, then __gnu_c got defined.

I tried port an dfu-util based checkm8 to F723edisco with teenyusb stack.
I make a copy of usbh_hid.c to usbh_dfu.c and removed unused codes,
then link new command "check" to
void cmd_check(char* argv[], int argc)
{
tusbh_interface_t* cdc = 0;
if (fs) {
cdc = find_dfu(((tusbh_root_hub_t*)fs->user_data)->children[0]);
}

if (!cdc && hs) {
    cdc = find_dfu(((tusbh_root_hub_t*)hs->user_data)->children[0]);
}

if (!cdc) {
    printf("No DFU interface attached\n");
}

int r = tusbh_dfu_dnload(cdc, (void*)Zero800, 0x800, 0x800);
printf("Send dnload result = %d\n", r);
if (r < 0)return;
printf("\n");

}
enum and find is working well,
but strange error occurred when test device with an 0x800 empty download packet.
In nxp's imxrt1010 evk I can do it and verify though packet sniffer, 32 data followed by setup packet.
in teenyusb the data packet is sent only 2 times if I recalled correctly
I don't know if it should be a issue, I think the ep0 control points shares same code between data points, and just working fine in descriptor / serial query

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