It can be done, but it's a LONG slog against prevailing current and winds. I have a friend who did it and he kept very close to shore to avoid the strongest part of the current (and even pick up a counter current), but this involves navigating in shallow waters with sand banks and many fishing boats. It requires a sharp eye at the helm and careful navigation 24 hours a day. On the positive side, you can put into a lot of beautiful ports and anchorages along the way that you wouldn't see coming from Cabo Verde. You can get all the Brazilian coastal charts for free from the Brazilian government in digital (raster) form that can be used with your laptop. They are excellent charts and frequently updated.
You'll find the charts here:
:: Diretoria de Hidrografia e Navegação
If you're not in a hurry, the trip is feasible, though not often done. Personally, I'd take the suggested route through the Atlantic islands and cut back to Brazil to land somewhere near Salvador. Then I'd sail south as far as Ilhabela, enjoying the the nicest part of the coast, and return north the same way, continuing on up the coast back to the Caribbean (this time with wind and current in your favour).