• AVR Freaks

Hot!EZBL - ezbl_comm fix for Linux

Author
Benjamin_hu
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2020/02/04 07:31:43
  • Location: Hungary
  • Status: offline
2020/02/12 14:14:17 (permalink)
0

EZBL - ezbl_comm fix for Linux

Hi, all!
 
It seems to me that ezbl_comm API from EZBL v2.11 is not ready to use in Linux. Firstly, it is not possible to build in Linux via gcc because some defined macros are missing in the header of MCP2221A API. Secondly, in I2C and UART Linux part the "Disable I/O buffering to make fread fwrite compatible" configuration is totaly missing in the code. It is important to set in Linux too, as it was set in Windows serial communication part.
 
Finally i fixed those things in ezbl_update.cpp and mcp2221_dll_um.h, so now i can build it and use it in Linux, feel free to use it. Pls Microchip use my fixes in your next EZBL versions! You can download the modification in the attachment.
 
Fix ezbl_comm for Linux:
Changes in ezbl_update.cpp to able to build and use in Linux:
  • forced to use include i2c-dev.h
  • i2c-0 acceptable in lower case, too. Only I2C-0 was acceptable before it but it was not a correct name for Linux I2C interface.
  • "Disable I/O buffering to make fread fwrite compatible" was fixed in UART and I2C part for Linux.
  • Removed B128000, B256000 UART baud rate, it is not supported in Linux kernel.
Changes in mcp2221_dll_um.h to able to build in Linux:
  • WIN32 macro for MCP2221A API related function declarations
post edited by Benjamin_hu - 2020/02/28 14:45:19
#1
Benjamin_hu
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2020/02/04 07:31:43
  • Location: Hungary
  • Status: offline
Re: EZBL - ezbl_comm fix for Linux 2020/02/13 14:15:02 (permalink)
0
Also you can download that Linux ezbl_comm fix from here.
https://drive.google.com/drive/folders/1udiVZbeOV1mDPFL3N-i6N560SxlmHVmm
 
#2
Jump to:
© 2021 APG vNext Commercial Version 4.5